DOM - Creating Documents
andyclar at us.ibm.com
andyclar at us.ibm.com
Fri Apr 23 19:12:45 BST 1999
Please pardon my tardiness -- I only follow the digest form of
this list.
As other people have already mentioned, it IS possible to build
DOM document objects programmatically using the IBM XML4J parsers,
version 1 and 2.
In version 1, the implementation is com.ibm.xml.parser.TXDocument.
This DOM 1.0 implementation has the benefit of additional non-DOM
functionality. For example, getting a (hash) digest value for any
subtree, namespace support, and content model objects stored under
the DocumentType object. This version of the DOM is supported in
the new version of the parser for compatibility with the older
version..
In version 2, the implementation is com.ibm.xml.dom.DocumentImpl.
This is a "vanilla" DOM in the sense that it's primary goal was
to fulfill only the basic requirements of the DOM specification.
It handles default attribute values by having ElementDefinition
(non-DOM) nodes under the DocumentType. Additional features have
been delayed in order to see what falls out of the W3C working
groups on matters such as how the document grammar is stored in
the Document.
For both versions, there is no factory method for creating the
Document instance. You have to use the constructor. We did add
a convenience method to the version 2 DOM parsers that allows
you to set the document implementation by class name. When you
do this, however, you don't get the performance benefit of lazy
evaluation of document nodes.
--
Andy Clark * IBM, JTC - Silicon Valley * andyclar at us.ibm.com
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list