PDA

View Full Version : Execute simple queries on a XML DataStore



Ducktale
26 Jan 2010, 2:51 PM
Hi there !



I would like to know if it is possible to execute queries on an XML Store.




More precisely, my DataStore looks like this:



var dataXML = new Ext.data.XmlStore({
url: 'xml-data/file.xml',
record: 'message',
fields: [
'category',
'subject'
]
});
I would like to execute this type of query (SQL-style) on the dataXML DataStore:

SELECT category, COUNT(*)
FROM dataXML
GROUP BY categorySo as to get a bidimensionnal array of the results :


var result = [
['cat1', 4],
['cat2', 6],
['cat3', 12],
['cat4', 1]
]
Is it possible ? Easy to do ?

Ducktale
28 Jan 2010, 7:44 AM
Any kind of help would be appriciated !
Thanks !