Processing XML Documents in Memory

As mentioned earlier, it is not always convenient to process information in one pass. For some types of applications, it will be more convenient to keep an in-memory copy of the data being processed. To process an XML document in this way, you could use single-pass processing, converting the document’s contents into internal, application-specific objects. You could manipulate these objects and then serialize them out as XML again once they’ve been processed. However, you might find it easier just to keep the data in an XML format in memory so you can manipulate it in situ and write it out again quite easily.

In-Memory Processing

The DOM defined by the W3C provides a model of an XML document from a programmer’s ...

Get Microsoft® Visual J#™ .NET (Core Reference) now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.