|
XML is typically used in two different kinds of contexts:
- It was originally designed to describe large and complex
documents in a structured way. XML is a pragmatic evolution
of SGML which had proven to be very cumbersome to use in practice.
- It is more and more used as a neutral language to describe data structures
passed among processes in distributed environments. XML then provides a more
flexible and neutral communication medium than binary solutions such as RPC
(Remote Procedure Call) and CORBA.
The former described context basically requires validators, XML databases, XML
query languages, and XML transformers, which can be in the form of style sheets.
Basically, the issue is just to store, retrieve and possibly restructure XML
documents.
The latter just needs parsers (to convert an XML stream
to some form of usable data structure) and unparsers
(to perform the opposite translation), but it puts more stress on performance,
since it must compare with statically compiled schemes based on RPCs.
Generic XML parsers are now available. As depicted in the figure below,
applications commonly use them to take an incoming XML message and turn
it into a generic tree structure (Such a tree is typically built according to
the DOM standard, defined by the W3C.) Depending on the application,
the incoming message can then be validated using a DTD or not.
The generic tree is then used by the application to fetch useful information
using runtime table lookups in attributes, and tree walkthrough primitives.
next...
|