Q
quindo
Hello,
I've searched the internet but couldn't find an answer so I'm hoping
someone here can help me.
A webpage recieves XML from the server using xmlhttp.
What I want to do is search in this xml browser-side.
XML-example:
<company>
<equipment>
<trackno>1</trackno>
<icode>ruthd</icode>
</equipment>
<equipment>
<trackno>4</trackno>
<icode>rdke</icode>
</equipment>
</company>
I want to display the icode from equipment with trackno 4.
Serverside I would have done that using XPath :
SelectSingleNode("/company/equipment [trackno='4']/icode")
How do I do this in Browserside Javascript.
The code has to work in both FireFox and IE.
Greetings,
Pieter
I've searched the internet but couldn't find an answer so I'm hoping
someone here can help me.
A webpage recieves XML from the server using xmlhttp.
What I want to do is search in this xml browser-side.
XML-example:
<company>
<equipment>
<trackno>1</trackno>
<icode>ruthd</icode>
</equipment>
<equipment>
<trackno>4</trackno>
<icode>rdke</icode>
</equipment>
</company>
I want to display the icode from equipment with trackno 4.
Serverside I would have done that using XPath :
SelectSingleNode("/company/equipment [trackno='4']/icode")
How do I do this in Browserside Javascript.
The code has to work in both FireFox and IE.
Greetings,
Pieter