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 difference between internal and external dtd?

563


Can an application process documents that use xml namespaces and documents that don’t use xml namespaces?

543


How to transform an XML into XHTML?

617


How do I create an rss feed?

539


Is xml a flat file?

569






Where is my rss feed?

535


Does it cost money to host a podcast?

519


Why we use xml instead of html?

548


Can I use a relative uri as a namespace name?

551


What is an xml product feed?

580


What are xml attributes?

520


What is xml and its benefits?

522


Whats does dtd mean?

540


What is parsing and how do I do it in xml?

534


If an element or attribute is in the scope of an xml namespace declaration, is its name in that namespace?

553