Xml text reader, DOT NET Programming

What is XML Text Reader?

The "XmlTextReader" class helps to give fast access to streams of XML data in a forward-only and read-only manner. The XMLTextReader also checks if the XML is well-formed. But the XMLTextReader does not validate against a schema or DTD for that you will need "XmlNodeReader" or "XmlValidatingReader" class.

The Instance of "XmlTextReader" can be created in number of ways. For e.g.  If you want to load a file from a disk you can use the below snippets.

XmlTextReader reader = new XmlTextReader(fileName);

To loop through all the nodes you require to call the "read ()" method of the "XmlTextreader" object. The "read()" method gives "true" if there are records in the XML document or else it returns "false".

//Open the stream

XmlTextReader reader = new XmlTextReader(file);

while (reader.Read())


// your logic goes here string pdata = reader.Value


// Close the stream


Posted Date: 9/25/2012 2:57:02 AM | Location : United States

Related Discussions:- Xml text reader, Assignment Help, Ask Question on Xml text reader, Get Answer, Expert's Help, Xml text reader Discussions

Write discussion on Xml text reader
Your posts are moderated
Related Questions
Job Portal A one-stop explanation to all your needs. Consist of employee as well as employer login accounts. Employee capable to look for jobs. Employer capable to post jobs.

What are the methods provided by the command object? The command objects used to connect the connection object to the Datareader or the dataset. The command object provided som

Update current website backend (asp.NET) and build Rest API to expose data I will shortly shape an HTML5 cross-platform mobile app. I at present have a website with a backend th

The ADO.NET gives the SqlCommand object which gives the functionality of executing the stored procedures. CREATE PROCEDURE SelectByEmployee @FirstName nvarchar(200) AS Se

I am looking for learning management software (LMS) preferably in ASP.NET and Microsoft SQL/ MYSQL server as the database. The broad scope of the system could be 1. User managem

Name the binders provided by .NET Framework 4.0. .NET Framework 4.0 provides the following binders: Object Binder - Enables to communicate with .NET objects. JavaScrip

What is ACID fundamental? What are transactions in SQL SERVER? The transaction is a sequence of operations performed as a single logical unit of work..The logical unit of work

I need a project which shows Paypal integration with ASP.net website We have events website written in C# and ASP.net. We want to integrate Paypal using API and have a full inte

Bug Prediction and Correction Project Description: The project is about the prediction of bugs and fixes the bug in the sample program using costriage algorithm. All the requ

recipe house Project Description: Web application with sql database Skills required are .NET, C# Programming, HTML, PHP, SQL