Combining the XmlTextReader and XmlTextWriter Classes

Awhile back I put out a new sample at http://www.xmlforasp.net that demonstrates how to combine the XmlTextReader and XmlTextWriter classes when custom XML needs to be output.  The example shows how to create SVG maps containing flight information.  Here’s more information about it:

“This code sample demonstrates how over 30 meg of XML data containing world mapping points, airport locations, and flight routes can be dynamically parsed and used to generate Scalable Vector Graphic (SVG) images. Because the images are vector-based they can be zoomed in and out without affecting the image quality. The example also shows how Web Services can be integrated into SVG. Airports shown on the map can be selected to view temperature and wind data (when available).

The SVG image was initially generated by using XSLT but due to the size of the 3 XML documents involved, XSLT was abandoned in favor of using the XmlTextReader and XmlTextWriter. These two classes provide an extremely efficient reading/writing combination. The sample has also been updated to leverage compressed SVG (.svgz file format) to speed up downloading SVG data to the browser. “

To try out the demo and/or download the code visit http://www.xmlforasp.net/CodeSection.aspx?csID=109.  Ewan Godley originally had a similar program written in VB6 so we took his idea and converted it to XML and SVG with .NET as the generation engine.  

comments powered by Disqus

No Comments