enter code herein the XML document :
<foo>
<bar><para> test </para> </bar>
<bar>text</bar>
<bar>stackoverflow</bar>
</foo>
I am trying to parse it and only get the Strings in bar; by using this way:
[function where node is the foo]
foreach (XmlNode subNode in node.ChildNodes)
{
if (subNode.Name == "bar")
{
if (!String.IsNullOrWhiteSpace(subNode.InnerText))
Debug.WriteLine(subNode.Name + " - " subNode.InnerText);
}
}
However it gives me test
Thanks