Chapter 10. Creating XML Documents with DOM


DOM is a read-write API. DOM documents are created not only by parsing text files, but also by creating new documents in memory out of nothing at all. These documents can then be serialized onto a stream or into a file. The abstract factory interface that creates new Document objects is called DOMImplementation . The Document interface has a dual purpose: First, it represents XML documents themselves and provides access to their contents, document type declaration, and other properties. Second, it too is an abstract factory responsible for creating the nodes that go in the document: elements, text, comments, processing instructions, and so on. Each such node belongs exclusively to the document that created it and cannot be moved to a different document.



Processing XML with Java. A Guide to SAX, DOM, JDOM, JAXP, and TrAX
Processing XML with Javaв„ў: A Guide to SAX, DOM, JDOM, JAXP, and TrAX
ISBN: 0201771861
EAN: 2147483647
Year: 2001
Pages: 191

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net