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

reader.Close();

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
Project Description: My needs are simple; the application will: - Get the results of a Google search query (The title, URL, the description, time posted) - Apply definite

Project Description: College erp Erp key features: Panacea ERP Online Suite is server based college based management software. Gives Password facility for different use

mailer - mail sender Project Description: I want a mailer: -run on Windows Server 2008 -use how many theard i need -more details speak on private Skills required

Project Description: We're seeking an IT candidate with experience to help us optimizely,  Skills required: .NET, C# Programming, ASP, eCommerce, SQL

What are the naming conventions required for XML elements tags? The following are the naming conventions that need to be followed for XML elements tags: Element names should

What is event bubbling? The Server controls such as  DataList, Datagrid,  Repeater can have another child controls inside them. For example the DataGrid can have combo box ins

What is SIX sigma? The Sigma means the deviation in Greek language. The Deviation means how much variations exist in a set of data. For illustrate  let's say in a software main

1. What are the limitations of file based data storing techniques?

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

Deat Sir/Madam, I need a small software .NET2.0 in C# That search for files by - name - extension - part of the name (contains) - file created before a date provided This search