PDA

View Full Version : Parse XML data in a DOM object



DiscoBoy
12 May 2010, 6:01 AM
My problem is, that i would like to use ExtJS to load XML data browser independantly. The goal is to have a xmlobject, which can later serve as data input for several XMLStores and instead of providing an url in each XMLStore, i provide the xmlobject via "data" property.

Now i don't find any option in ExtJS to parse the xml text (sent from a server) into a xmlobject...

Help appriciated! Thanks a lot!

Animal
12 May 2010, 7:31 AM
You receive an XHR from your Ajax call

http://www.w3.org/TR/XMLHttpRequest/#the-responsexml-attribute

DiscoBoy
13 May 2010, 8:11 AM
Thx a lot! How easy :-) So i need to use response.responseXML instead of response.responseText. I used the latter only cause it appears in the API example.