| Author: Sabu C Alex 28 Jul 2008 | Member Level: Gold | Rating: Points: 5 |
hi syam
see this code
XmlDocument xDoc = new XmlDocument(); xDoc.GetElementById("elementname");
here you have to specify the element name. that will return that element
another one is
xDoc.GetElementsByTagName("") here you can give the element name. that function will return a list of xml nodes means XmlNodeList. that is the collection XmlNodes
hope this will help you
|
| Author: Ratheesh 29 Jul 2008 | Member Level: Gold | Rating: Points: 1 |
XmlDocument xmldoc = new XmlDocument(); xmldoc.Load(Server.MapPath("Employee.xml")); XmlNodeList xmlnodes = xmldoc.SelectNodes ("Employee/EmpName"); DataGrid1.DataSource = xmlnodes; DataGrid1.DataBind ();
|