what is XML Reader Class

Posted by Jameschowdare under ASP.NET on 5/13/2009 | Views : 2267 | Status : [Member] | Replies : 2
what is XML Reader Class




Responses

Posted by: Vuyiswamb on: 5/13/2009 [Member] [MVP] [Administrator] NotApplicable

Up
0
Down
Good Afternoon Jameschowdare

XmlReader Class
Represents a reader that provides fast, non-cached, forward-only access to XML data. like Datareader in Ado.net but this one is for XML. check here for more info

http://msdn.microsoft.com/en-us/library/system.xml.xmlreader(vs.71).aspx


Thank you for Posting at Dotnetfunda

Vuyiswa Maseko

Thank you for posting at Dotnetfunda
[Administrator]

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Syedshakeer on: 5/13/2009 [Member] Starter

Up
0
Down
create one xml file Name "example.xml". Now with .NET XmlTextReader class we will read this XML file

//First cretare an object of XMLTextReader
XmlTextReader reader = new XmlTextReader("books.xml");
while (reader.Read())
{
// Do some work here on the data.
Console.WriteLine(reader.Name);
}
Console.ReadLine();


Syed Shakeer Hussain

Jameschowdare, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response