There is a third major area, Web Development, whose requirements are
often hybrid, and span the features of both document and data applications
because they contain partly static descriptive text and partly dynamic data.
While in theory it would be possible to use data-class software to write a
novel, or document-class software to create invoices, it would probably be
severely suboptimal. Because of the nature of the information used by the
two classes, data-class applications tend to useSchemas, and document-class
applications tend to useDTDs, but there is a considerable degree of overlap.
The way in which XML gets used in these two classes is also divided in two:
XML can be used manually or under program control.
M This means editing and maintaining the ﬁles with an editor,
from the keyboard, seeing the information on the screen as you do so.
This is suitable for individual documents, especially in the publishing
ﬁeld, for web pages, and for developers working on single instances
such as sample ﬁles or web site templates. Manual processing also
implies running production programs like formatters, converters, and
database queries on a one-by-one basis, using the keyboard and mouse
in the normal way. Much of the software for manual usage can be run
from the command line, which makes it easy to use for one-oﬀ
applications and in hidden applications like Web scripts.
P This means writing programs which call on
software services from APIs, libraries, or the network to handle XML
ﬁles from inside the program. XML ﬁles in data applications are almost
never edited by hand. This is the normal method of operating for
e-commerce applications, web automation, web services, and other
process or application controls. There are libraries and APIs for many
languages, including Java, C, and C++ as well as the usual scripting
languages like Python, Perl, Tcl, Ruby, etc.
In addition to these axes, there are currently two diﬀerent ways of
processing XML, memory-mapped or event-triggered, usually referred to by
the names of their original instantiations, theDocumentObjectModel
(DOM)andthe Simple API for XML (SAX)respectively. Bothuseamodelof
document engineering based on a tree-like structure of hierarchical
document markup known as aGrove(a collection of trees, eﬀectively an
in-memory map of the result of parsing the document markup). In this