Menu
I have a XML like this
[code]
<?xml version=”1.0″ encoding=”UTF-8″?>
<family>
<parent pos=”1″>
<name></name>
<birth></birth>
<death></death>
<fwife>
<name></name>
<birth></birth>
<death></death>
</fwife>
<sons>
<parent pos=”11″>
<name></name>
<birth></birth>
<death></death>
<fwife>
<name></name>
<birth></birth>
<death></death>
</fwife>
<sons>
…
</sons>
</parent>
</sons>
</parent>
</family>
Someone could tell me a way to get a parent node based on the pos attribute with JavaScript, please?
I know that I can use the getAttribute and loop, but is there a more efficient way? This xml can become a very large file.
Cheers ?