Wednesday, November 30, 2022
Code Search
Code Bank
.NET Applications
XSD Schema Generator
.NET/XML Training


Filtering XML Documents using the XmlTextWriter and XmlTextReader

Large XML documents present a problem when they need to be transformed into other formats using XSLT or filtered using the XmlDocument class. This is due to the document being loaded into memory.

Fortunately, the .NET platform provides a robust set of classes that can be used to accomplish just about any task. In cases where large XML documents need specific nodes filtered out, the XmlTextWriter can be used along with the XmlTextReader to perform the filtering operation quickly and efficiently without consuming a large amount of memory. This example shows how this is accomplished by using the WriteNode() method of the XmlTextWriter. By using the technique shown, large XML documents can be pre-processed before an XSLT transformation so that the impact on memory is minimized.

Teaches XML, XmlTextReader, XmlTextWriter
Requirements .NET 1.0
Example: Click Here
View Source Code: Click Here
Download Code: Click Here


.NET, SharePoint and Silverlight Training Solutions
    Online, Onsite and Video Training on .NET and SharePoint technologies available through The Wahlin Group.

© 2007 Wahlin Consulting LLC
XML for ASP.NET Developers in bookstores