Generating XML through the DOM in ASP
- Cleaner, but looks like code Using the DOM to construct XML documents ensures that your documents will be well-formed. (No guarantees about validity, though!) On the other hand, it becomes much more difficult to just look at the code and get a clear picture of what the resulting documents will look like.
- A natural fit for some kinds of processing Developers building data-oriented applications will be happy to see code that relects the data models they are using rather than an arbitrary document. Depending on what kind of programming models you're used to, this may feel more like application-building.
- Easier to modularize Because the DOM is an object rather than a text stream, it's much simpler for scripts to call DOM processors that perform specific processing. Those DOM processors can be script modules, XSL style sheets, or custom-coded tools that handle particular tasks efficiently.
- Allows different kinds of processing Scripts can examine the DOMs they've already created, and make changes after the fact. This is difficult or impossible to do with a text stream.
<Previous Page TOC Next Page>
Copyright 2000 Simon St.Laurent