XML - Read a specific node

Oct 23 2009 7:46 AM
Hi, I need more help I have a xml file that contains this node: 1.46590270801; 1.47197105847; 1.44441393964; 1.45198190444; 1.42069704633; 1.48390857689 And this code, String xmlString = textBox4.Text; XmlTextReader reader = new XmlTextReader(new System.IO.StringReader(xmlString)); while (reader.Read()) { XmlNodeType nodeType = reader.NodeType; if (nodeType == XmlNodeType.Element) { switch (reader.Name) { case "out": textBox5.Text = reader.ReadString(); break; } } } If I ask to get a value from xml in a node like this: testing Using this code I can obtain in textbox5 the value testing. But If I ask the value from node "out" the textbox5 is empty... and how can I get the first value (1.46590270801;)? Cheers!

Answers (1)