Reading an XML File
To Read the data present in xml file
Description
Reading an XML File
XmlTextReader tr = new XmlTextReader(Server.MapPath ("info.xml"));
while (tr.Read())
{
if (tr.NodeType == XmlNodeType.Text)
Response.Write (tr.Value);
}
Explanation:
The above code snippet helps to load data from XML file.
XmlTextReader object is used to read the data from XML file.
Using while loop read the text node content of xml file
Nice explanation. Thanks. Here's another simple approach to read xml file in asp.net http://www.freedotnetapps.com/asp-net/how-to-read-data-from-xml-file-in-asp-net/