Hi all,
I am turning to this forum to get a little help for my non-profitable project. I am using javascript to parse some XML file.
XML looks like this
what I want is to parse all "<face>" nodes in path "fdrml/images/faces". Now I do it using:
but this returns me all "<face>" nodes including those nodes in "fdrml/images/results/faces" path... I just want to get the list of nodes in from here "fdrml/images/faces"?
Many thanks for your help,
Primoz
I am turning to this forum to get a little help for my non-profitable project. I am using javascript to parse some XML file.
XML looks like this
Code:
<fdrml>
<image>
<faces>
<face></face>
<face></face>
<face></face>
</faces>
</image>
<results>
<faces>
<face></face>
<face></face>
<face></face>
</faces>
</resukts>
</fdrml>
Code:
var xmlSource = getXML(file.xml);
var sourceRoot = xmlSource.documentElement;
face_list = sourceRoot.getElementsByTagName("Face")
Many thanks for your help,
Primoz
Comment