How to Parse Xml String in DotNet 2003 C#.

How to Parse Xml String in DotNet 2003 C#.

Post by Manj » Sat, 04 Nov 2006 23:08:57

We have a database which will store the data in the xml format and we
need to parse the xml and display the data in the html tables,

I am very new to Dot net, I will be great full to you people if I can
get some idea how to go about xml string parsing in dot net 2003 C#



1. C# - parsing an XML string


I am developing in Visual Studio .NET 2005.  I am attempting to parse
an XML string by using the example given in the help files:



string xmlData ="<item productID='124390'>" +
                        "<price>5.95</price>" +

// Create the XmlReader object.
XmlReader reader = XmlReader.Create(new StringReader(xmlData));

However, when I attempt to actually parse this string by

string productID = reader.GetAttribute("productID");

I just get null for productID.  Can anyone see what I am doing wrong?


2. Quicklaunch toolbar

3. Xml Parsing Error sending valid Xml to stored procedure from ADO.Net / C#

4. ? Audio Watermarking Tech-infos ?!

5. Parse an xml string.

6. Reformatting an A7000+

7. Newbie... Parse String into A XML Schema/dataset

8. Parse an xml string.

9. About High Level string parsing in C#

10. New XML parsing solution for C#

11. c# specs and ide do not match parsing of XML comments

12. Example of how to parse a XML document in C# with DOM