PDA

View Full Version : Accessing XML Data loaded into Grid



tellioglu
6 Apr 2007, 10:07 AM
Hi,

I am loading XML data into a Grid using an Ext.data.Store and and Ext.data.XmlReader. Everything works fine so far :)

After loading I want to access the loaded XML data directly. Could anyone give me a hint on how to do this please?


Regards,
Horst

Animal
7 Apr 2007, 12:35 AM
myXmlReader.xmlData contains the document

tellioglu
7 Apr 2007, 6:41 AM
Works perfectly :)

Thank you very much!
Horst

fredrik.stockel
7 May 2007, 3:35 AM
is it possible to sccess the xmlData property directly from the store? and not through the grid.getDatastore().reader.xmlData?

example:

var ds = new Ext.data.Store({
...
});


ds.load();

var doc = ds.reader.xmlData;
alert(doc);

I get "undefined" and I guess it's because of the async call...

Animal
7 May 2007, 4:51 AM
Yes, load is async, you'll have to process the XML document when it's loaded and not before.