This class implements the DOM
Document interface, and also provides static factory methods to create document instances. Instances represent the top level of an XML 1.0 document, typically consisting of processing instructions followed by one tree of XML data. These documents may be written out for transfer or storage using a variety of text encodings.
The static factory methods do not offer any customization options. in particular, they do not enforce XML Namespaces when parsing, do not offer customizable element factories, and discard certain information which is not intended to be significant to applications. If your application requires more sophisticated use of DOM, you may need to use SAX directly with an XmlDocumentBuilder.
Note: element factories are deprecated because they are non-standard. They are only provided in this version for backwards compatibility. Instances are factories for their subsidiary nodes, but applications may provide their own element factory to bind element tags to particular DOM implementation classes (which must subclass ElementNode). For example, a factory may use a set of classes which support the HTML DOM methods, or which support methods associated with XML vocabularies for specialized problem domains as found within Internet Commerce systems. For example, an element tag <PurchaseOrder>
could be mapped to a com.startup.commerce.PurchaseOrder
class. The factory can also use XML Namespace information, if desired.
Since DOM requires nodes to be owned exclusively by one document, they can't be moved from one document to another using DOM APIs. This class provides an changeNodeOwner functionality which may be used to change the document associated with a node, and with any of its children.
Only the core DOM model is supported here, not the HTML support. Such support basically adds a set of convenience element types, and so can be implemented through element factories and document subclasses.
@see XmlDocumentBuilder
@author David Brownell
@author Rajiv Mordani
@version $Revision: 1.9 $