Yep, you'll want to use ajax.responseXML then. It returns a XML object that can be parsed using standard DOM methods. In the case of:
Code:
<?xml version="1.0" encoding="utf-8"?>
<employees>
<employee name="J.Doe">
<job>Programmer</job>
<salary>32768</salary>
</employee>
<employee name="A.Baker">
<job>Sales</job>
<salary>70000</salary>
</employee>
<employee name="Big Cheese">
<job>CEO</job>
<salary>100000</salary>
</employee>
</employees>
You can get to the first employee's salary by doing something like:
Code:
var xmlobj=ajax.responseXML
var DoeSalary=xmlobj.getElementsByTagName("employee")[0].childNodes[1].nodeValue
A handy reference with the various DOM element methods can be found here.
Bookmarks