PDA

View Full Version : pulling data from a store base xmlReader



yahavgall
21 Nov 2009, 2:19 PM
Hi,

i am trying to perform a search on a store object, the store object is input data is from an xml file:

var store = new Ext.data.Store({
url: persons_db.xml',
reader: new Ext.data.XmlReader({
record:'row',
id:'id'
}, [
'id',
'age',
'name',
'country'
])
});
store.load();


i have few records at the xml file:
id age name country
3476 28 jhon england
3245 27 david brazil
1213 28 julia france


is it possible to do a search for specific cell value with a loop?
for example: returning all the id's of the persons who live in brazil
is it possible to do it without presenting the data to a grid/combo?
is it possible to do the following:

filter the store according to the column age (where age == 28 ) and returning all the id's, names, countries, (one by one) ?
for example (kind of pseudo):
while(store != NULL)
{
alert (store.filter(age==28).name);
alert (store.filter(age==28).country);
get next record()
}

is there any way to do it?

thanks in advance