XML
  Home arrow XML arrow Page 2 - XML Processing with the XMLReader Object, ...
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
XML

XML Processing with the XMLReader Object, Part 1
By: Harish Kamath (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 14
    2004-02-02

    Table of Contents:
  • XML Processing with the XMLReader Object, Part 1
  • Class Act
  • Visiting the Library
  • Digging Deeper
  • Into the Real World

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    XML Processing with the XMLReader Object, Part 1 - Class Act


    (Page 2 of 5 )

    The XMLReader abstract class plays a very important role in implementing the new "pull model." As part of the System.XML tree, the primary objective of this class is to provide developers with a framework to implement this new model. If you're an adventurous developer, you can use this abstract class as the basis for your very own, custom-crafted XMLReader object. Or you could do what I did: take the easy way out and utilize any one of the built-in classes that already do this for you.

    The .NET framework provides three such built-in classes:

    1. The plain-vanilla XmlTextReader class behaves as a "forward-only, noncached reader" to read XML data. It's versatile enough to allow you to access XML from different input sources, including flat files, data streams, or URLs.

    2. The XmlTextReader has one little drawback: it doesn't allow you to validate the data present in the XML source. If you are looking for a foolproof way to maintain the sanctity of your data, you are better off using the XmlValidatingReader class. This is the only class in this category that comes with built-in features to validate your XML data against external DTDs, XDR or XSD schemas.

    3. In case you're looking to implement the "pull model" on a DOM tree that's already present in memory, you can consider using the XmlNodeReader class. Best-suited only for the very specialized application mentioned above, this class allows you read the data from specific nodes of the tree and enjoy a double benefit: the speed associated with the XMLReader class and the ease of use of the DOM.

    Now that you know the theory, how about seeing it work in the real world?

    More XML Articles
    More By Harish Kamath (c) Melonfire


     

    XML ARTICLES

    - More on Triggers and Styles and Control Temp...
    - Looking at Triggers with Styles and Control ...
    - A Closer Look at Styles and Control Templates
    - Styles and Control Templates
    - Properties and More in XAML
    - Elements and Attributes in XAML
    - XAML in a Nutshell
    - Importing XML Files into Access 2007
    - Using MSXML3.0 with VB 6.0
    - MSXML, concluded
    - MSXML, continued
    - MSXML Tutorial
    - Generating XML Schema Dynamically Using VB.N...
    - XSL Transformations using ASP.NET
    - Applying XSLT to XML Using ASP.NET





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
    Stay green...Green IT