Since elements, text nodes, comments, processing instructions, etc. cannot exist outside the context of a Document, the Document interface also contains the factory methods needed to create these objects. The Node objects created have a ownerDocument attribute which associates them with the Document within whose context they were created.
The DocumentImpl class also implements the DOM Level 2 DocumentTraversal interface. This interface is comprised of factory methods needed to create NodeIterators and TreeWalkers. The process of creating NodeIterator objects also adds these references to this document. After finishing with an iterator it is important to remove the object using the remove methods in this implementation. This allows the release of the references from the iterator objects to the DOM Nodes.
Note: When any node in the document is serialized, the entire document is serialized along with it. @xerces.internal @author Arnaud Le Hors, IBM @author Joe Kesselman, IBM @author Andy Clark, IBM @author Ralf Pfeiffer, IBM @version $Id: DocumentImpl.java 890667 2009-12-15 06:41:08Z mrglavas $ @since PR-DOM-Level-1-19980818.
|
|