XML In ASP.NET - The XmlTextReader
http://www.csharpfriends.com
World's Greatest C# Community    
Home Articles C# Forums Books C# Syntax C# Spec C# Jobs free Source Code Advertise About
 

Control Panel

[ Sign In / register ]
Points   
Notes 
My Forums
My Tutorials
My Profile

Resources

Learn
 Articles
 QuickStarts
 C# Spec
 Whitepapers
 Tools
 Class Browser
 C# Code Generator
 Links
 Misc Rss Feeds
 Code Highlight
 411 Directory
 FREE magazines
 freevb.net

Reviews
  ASP.NET Hosting

Source Code
 Get Version 1.0



C# Consulting
AspDotNetStoreFront
Chapter:   XML
Current Lesson:
XML In ASP.NET - The XmlTextReader
[Latest Content]
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ALL
[prev. Lesson]  Reflection Explained [next Lesson]  XmlDocument and XmlNode Basics
XML In ASP.NET - The XmlTextReader
  by: Salman Ahmed

To leverage XML ( eXtensible Markeup Language ) features in ASP.NET, you have to reference the System.XML namespace. Take a look at some of the classes found in the namespace to get a birds eye view of XML with ASP.NET.

So today you are going to learn about the XmlTextReader class, in future articles I will cover the other commonly used classes.

Unlike the in-memory XmlDocument, the XmlTextReader parses the XML document in a forward-only stream. The benefits of reading the XML in a forward-only fashion is speed, but of course you will lose some functionality when comparing to the in-memory approach of the XmlDocument. If you are working with very big XML documents, you will find that the XmlDocemtn can bog things down when compared to the forward-only XmlTextReader. If you don’t require the extra functionality of the XmlDocument, use the XmlTextReader.

There are many properties and methods in the XmlTextReader, here’s a quick example that demonstrates reading a simple XML document with the XmlTextReader class. Let's take a look at a live demo and then I'll explain what's going on briefly.


1 2  (Page 2) -->


Build Your Own ASP.NET Website Using C# & VB.NET

Chapter:  XML
Current Lesson:
XML In ASP.NET - The XmlTextReader
[Latest Content]
A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | ALL
[prev. Lesson]  Reflection Explained [next Lesson]  XmlDocument and XmlNode Basics


Today's Top Movers
vulpes 6800
MadHatter 2220
jal 867
Jeff1203 857
muster 791

Yesterday Top Movers
shakti sin.. 9
MadHatter 3
C#fanatic 2
Al_Pennywo.. 2
sksandz 1

Monthly Leaders
vulpes 6800
MadHatter 2260
jal 867
Jeff1203 857
muster 791

Top Members
mosessaur 18457
Rincewind 7074
stanleytan 6995
vulpes 6800
Gsuttie 6046

Great Offers
.net hosting
Go To My Pc
Remote Pc Control
zonealarm
spam blocker
web hosting directory
ad server   C#
snadtech GoToMyPc

Top of Page

Advertise | About | Link To Us | Privacy Notice Copyright © 2003 - 2005 CSharpFriends.com  All Rights Reserved  Visual C# Developer Center