An architecture for processing an Extensible Markup Language (XML)
document converts schema elements in the XML document to data type
definition (DTD) objects that can be used to validate data elements in
the XML document. The architecture utilizes a node factory design in
which an XML parser calls one or more node factory interfaces to
construct an in-memory tree representation of an XML document. One of the
node factory interfaces is a schema node factory, which is a thin layer
that receives calls from the parser to build nodes in the tree
representation and translates those calls to calls to a schema builder.
The schema builder is a table driven interface that converts the schema
elements in the XML document into DTD objects. The DTD objects are then
used to validate the data elements as belonging to the schema. If valid,
the data elements are used to construct the tree representation.