How to add XML Parser to manipulate xml in spidermonkey
msami <[email protected]> Wed, 28 Aug 2019 07:23:33 -0700 (PDT)
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
How to add XML Parser to manipulate xml in spidermonkey
I want to parse xml like this:
<?xml version="1.0" encoding="UTF-8"?>
<quote xmlns="http://www.example.org">
<ticker>F</ticker>
<name>Ford Motor Company</name>
<change>1.00</change>
<last>30.00</last>
</quote>
and handle it like document object in a browser as following
var price= quote.documentElement.getElementsByTagNameNS("http://www.example.org", "last").item(0).firstChild.data;