Creating XML Documents
If your primary goal is analyzing the contents of an XML document, you will probably find the XML DOM parsing model much more effective than readers in spite of the larger memory footprint and set-up time it requires. A document loaded through XML DOM can be modified, extended, shrunk, and, more important, searched. The same can’t be done with XML readers; XML readers follow a different design center. But what are the advantages of creating XML documents using XML DOM?
To create an XML document using the XML DOM API, you must first create the document in memory and then call the Save method or one of its overloads. This system gives you great flexibility because no changes you make are set in stone until you save the document. ...
Get Applied XML Programming for Microsoft® .NET 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.