Click to See Complete Forum and Search --> : How to check root element?


swati jain
10-19-2006, 04:21 AM
How to c
check for root element in xml file using xml document or xmltextreader?

sirpelidor
10-19-2006, 10:42 AM
use xpath (http://www.w3schools.com/xpath/default.asp) . The System.Xml.XmlDocument (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXmlDocumentClassTopic.asp) SelectNodes method will accept xpath.

Using xpath and you'll be able to move around any nodes from ur xml doc freely.