
TIP
So, when do you use DOM and when do you write your own generator? I find that
DOM is ideal for modifying existing documents. In most other cases, I prefer my own
generator.
292
Chapter 9: Writing XML
Figure 9.4: Comparing DOM with an ad hoc generator
Doing Something with the XML Documents
Now that you can create XML documents, you probably want to do some-
thing more involved than display the XML code in an HTML form. In most
cases, the application can either save the document to a file or send it to a
server.
✔ This section looks briefly at your options to save the document or send it to the server.
We will revisit this topic in Chapter 12, “Putting ...