reading elements of xml
C#
2
Posts
2
Posters
0
Views
1
Watching
-
can anybody help me reading the elements of xml document??? Regards
sAqIb "Our scientific power has outrun our spiritual power. We have guided missiles and misguided men." Dr. Martin Luther King Jr.
Get the document element using following code: XmlDocument xmlDoc = new XmlDocument(); xmlNode root = xmlDoc.DocumentElement; XmlNode node = root.FirstChild; Now you can traverse all nodes of xml file depending upon the structure of file, using a simple while loop.... while (node != null) { node = node.NextSibling; // or node = node.FirstChild; // etc. } Hope that helps....
.................. QUAIDIAN FOR ONCE, QUAIDIAN FOR EVER!