I'm starting to get into XML, so I was wondering if there is a good primer on the topic - I'm not really finding anything good or even halfway sensible.
That said, I'm trying to conduct a search against a XML file I've created, but I'm finding it's not working on anything I try, any example I try off the net. So basically I'm just looping through all the nodes and picking out the ones with the right values: if this is what I have to do, then the whole thing is pretty brain-dead.
I'm trying to use SelectSingleNode with a XPath string.
A section to illustrate what I'm trying to do.
What I'm needing is to find a specific "Child" node that has a "Attrib2" value of a specific thing.
Any thoughts?
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.
That said, I'm trying to conduct a search against a XML file I've created, but I'm finding it's not working on anything I try, any example I try off the net. So basically I'm just looping through all the nodes and picking out the ones with the right values: if this is what I have to do, then the whole thing is pretty brain-dead.
I'm trying to use SelectSingleNode with a XPath string.
A section to illustrate what I'm trying to do.
Code:
<MainNode Attrib1="Value1">
- <Child1 Attrib2="Value2">
- <GrandChild1 Attrib3="Value3">
- <Child2 Attrib2="Value4">
- <GrandChild1 Attrib3="Value5">
What I'm needing is to find a specific "Child" node that has a "Attrib2" value of a specific thing.
Any thoughts?
It is not possible for anyone to acknowledge truth when their salary depends on them not doing it.