How do you access elements in XML document?

Answer Posted / aravazhi

This way u can access...
XmlDocument xmldoc = new XmlDocument();
xmldoc.Load(Server.MapPath("Employee.xml"));
XmlNodeList xmlnodes = xmldoc.SelectNodes
("Employee/EmpName");
DataGrid1.DataSource = xmlnodes;
DataGrid1.DataBind ();

Is This Answer Correct ?    4 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the use of xml data binding?

692


What is xsl used for?

634


What are the condtions that apply in case of xsl:stylesheet element?

644


If xml is just a subset of sgml, can I use xml files directly with existing sgml tools?

687


What is wsdl and how it works?

630


What are the steps in the instantiation of a template?

729


Define XPathNavigator class?

684


what are the special characters in xml ?

686


What can I do with an xml file?

619


Can we use xml as database?

620


What is the difference between csv and xml?

622


What is xml used for?

668


describe the role of xpath?

624


What is the difference between xml and http?

649


What is the difference between rss feeds and atom feeds?

691