G
Guest
Hello,
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:
ms-help://MS.VSCC.v80/MS.MSDNQÂTR.v80.en/MS.MSDN.v80/MS.NETDEÂVFX.v20.en/cpref/html/M_SystemÂ_Xml_XmlReader_Create_1_6b7628Â9f.htm
namely,
string xmlData ="<item productID='124390'>" +
"<price>5.95</price>" +
"</item>";
// Create the XmlReader object.
XmlReader reader = XmlReader.Create(new StringReader(xmlData));
However, when I attempt to actually parse this string by
reader.ReadStartElement("item"Â);
string productID = reader.GetAttribute("productIDÂ");
I just get null for productID. Can anyone see what I am doing wrong?
Thanks,
Don
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:
ms-help://MS.VSCC.v80/MS.MSDNQÂTR.v80.en/MS.MSDN.v80/MS.NETDEÂVFX.v20.en/cpref/html/M_SystemÂ_Xml_XmlReader_Create_1_6b7628Â9f.htm
namely,
string xmlData ="<item productID='124390'>" +
"<price>5.95</price>" +
"</item>";
// Create the XmlReader object.
XmlReader reader = XmlReader.Create(new StringReader(xmlData));
However, when I attempt to actually parse this string by
reader.ReadStartElement("item"Â);
string productID = reader.GetAttribute("productIDÂ");
I just get null for productID. Can anyone see what I am doing wrong?
Thanks,
Don