PDA

View Full Version : Load XML with attributes in a store



sirkis
29 Nov 2011, 12:50 AM
I want to load those XML information in a store.



<forecast_information>
<latitude_e6 data="46846605"/>
<longitude_e6 data="6846887"/>
<forecast_date data="2011-11-29"/>
<current_date_time data="1970-01-01 00:00:00 +0000"/>
<unit_system data="SI"/>
</forecast_information>


Do you have any idea to build the model ?

Thanks

tobiu
29 Nov 2011, 1:57 AM
http://docs.sencha.com/ext-js/4-0/#!/api/Ext.data.reader.Xml

example on top of the page.

skirtle
29 Nov 2011, 4:13 AM
To access attributes you need to use an @ sign. It'd be something like this:


mapping: 'latitude_e6/@data'