Parse xml file with a nested structure with jQuery



I have an xml-file with the following structure:



<field>
<title>Wrong</title>
<value>Don't want this</value>
</field>
<field>
<title>Dialogue Text</title>
<value>The gold is here</value>
</field>


How can I use jQuery to get the text inside the value-tag, but only if the text inside the title-tag above it was "Dialogue Text"?


In other words, how can I select the value based on the content of the title tag?


No comments:

Post a Comment