Hello Everyone,
Now i am venturing the XmlReader option in Extjs. But I am unable to read an xml file. Please help me by showing the demo.
Here is my code:
My XML File is:
Now i am venturing the XmlReader option in Extjs. But I am unable to read an xml file. Please help me by showing the demo.
Here is my code:
Code:
var store = new Ext.data.Store({
url:'login.xml',
autoLoad:true,
reader: new Ext.data.XmlReader({
// record will have an "loginInformation" tag
record:'loginInformation',
id:'ID'
//totalRecords: '@total'
}, [
'USERNAME','PASSWORD'
])
});
store.load();
alert(store.getTotalCount());
Code:
<?xml version="1.0" encoding="UTF-8"?> <loginInformation> <ID>1</ID> <USERNAME>vibha</USERNAME> <PASSWORD>vibha</PASSWORD> </loginInformation>
Comment