I've been searching SO (and the rest of the Internet) for the answer, but I can't seem to find a solution for selecting an XML node based on an attribute.
Example XML:
<foo>
<bar name="do">A</bar>
<bar name="rae">B</bar>
<bar name ="mi">C</bar>
</foo>
So if I want to get B by the rae value of the name attribute, I've tried:
myValue = myXML.selectSingleNode("//foo/bar/").Attributes.getNamedItem("rae").Text
Thanks!
For Eachto iterate through the items. I'm hoping to pull a value from a specific node before I start any further parsing.For Eachloop? Instead of looping through the children, grab a node by its name, then grab the Attributes, then the named item. The code within theFor Eachloop should still be applicable.