XML Processing With The XMLReader Object, Part 2 - Linking Out
(Page 6 of 6 )
And that's about all I have. At the beginning of this two-part tutorial, I told you that the .NET Framework came with three important classes derived from the XMLReader abstract class. I started with the most-used of these, the XMLTextReader class, and showed you how to use it to process elements, attributes and the data within them.
Today, the second part of this two-part series began with a simple example showing you how to validate an XML document against a XML Schema before processing it. I also showed you how to do the same thing with a DTD instead of a Schema, something that might happen on older legacy systems. This was followed by an introduction to the third member of this interesting set of classes, the XMLNodeReader class, and an example demonstrating its use. Finally, to wrap things up, I concluded by explaining how to handle errors when using a .NET XMLReader object to read XML files.
To learn more, consider visiting the following links:
Reading XML with the XmlReader, at
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpguide/html/cpconreadingxmlwithxmlreader.asp
The Fundamentals of DTD Design, at
http://www.melonfire.com/community/columns/trog/article.php?id=89
Understanding XML Schema, at
http://www.melonfire.com/community/columns/trog/article.php?id=91
A Better Way to Parse XML Documents in .NET, at
http://builder.com.com/5102-6373-1044772.html
Comparing XmlReader to SAX Reader, at
http://msdn.microsoft.com/library/default.asp?url=/library/en-
us/cpguide/html/cpconcomparingxmlreadertosaxreader.asp
See you soon!
NOTE Examples are illustrative only, and are not meant for a production environment. Melonfire provides no warranties or support for the source code described in this article.
| DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware. |