I hade a xml string and convert it to xmlDom object in jquery it is something like this :
'<Form>
<Menu>
<Title>Hello world1</Title>
<Val>val0</Val>
</Menu>
<Menu>
<Title>Hello world2</Title>
<Val>val1</Val>
</Menu>
</Form>'
I want to have a query that give me title of All Menu tags that have Val=val0,
I wrote this
$(xml).find("Form > Menu > Val:eq('val0')") .each(function () { alert($(this).text()); });
it gives me just val0 ,but i want to give me ‘Hello world1’
how to fix this?
use