I'm new to XML in programming, so I need help with this one:
I have a XML file like this:
<?xml version="1.0" standalone="yes"?>
<contestants>
<fighter>
<Name>Ryu</Name>
<Folder>ryu</Folder>
</fighter>
<fighter>
<Name>Ken</Name>
<Folder>ken</Folder>
</fighter>
<fighter>
<Name>M. Bison</Name>
<Folder>m_bison</Folder>
</fighter>
[...]
</contestants>
Now I want to select the folder node based on the name node, something like this in SQL:
SELECT Folder FROM contestants WHERE Name='Ryu'
What is the best way to do so? I've already been looking for some answers, but the only provide the solutions for attributes, not for nodes.
XElementtostring, it will return the text value within the element.