
9
Writing XML
In the last four chapters, you learned how to use XML documents in your
applications. You studied style sheets and how to convert XML documents
in HTML. You also learned how to read XML documents from JavaScript or
Java applications with a parser.
This chapter looks at the mirror problem: how to write XML documents
from an application. The mirror component for the parser is called a gener-
ator. Whereas the parser reads XML documents, the generator writes them.
In this chapter, you learn how to write documents
• through DOM, which is ideal for modifying XML documents.
• through your own generator, which is more efficient.
The Parser Mirror ...