November 2002
Intermediate to advanced
1120 pages
21h 2m
English
The Apache XML Project's Xerces-J includes the org.apache.xml.serialize package for writing DOM Document objects onto output streams. Although this class is bundled with Xerces, it works with any DOM2 implementation. It does not depend on the details of the Xerces implementation classes, only on the standard DOM interfaces.
The basic technique for serializing documents with org.apache.xml.serialize is as follows:
1. |
Configure an OutputFormat object with the serialization options you want.
|
2. |
Connect an OutputStream to the location where you want to store the data.
|
3. |
Use the OutputStream and the OutputFormat to construct a new XMLSerializer object.
|
4. |
Pass the Document object you want to serialize to the XMLSerializer ... |
Read now
Unlock full access