-
10 Oct 2011 2:57 PM #1
Answered: Configure reader.Xml to read custom format
Answered: Configure reader.Xml to read custom format
So the native reader.Xml can handle xml with this format:
But my framework uses xml like this:Code:<users> <user> <id>1</id> <name>Ed Spencer</name> <email>ed@sencha.com</email> </user> <user> <id>2</id> <name>Abe Elias</name> <email>abe@sencha.com</email> </user> </users>
How would you go about solving this?Code:<users> <user id="1" name="Ed Spancer" email="ed@sencha.com"/> <user id="2" name="Abe Elias" email="abe@sencha.com"/> </users>
Kind Regards,
Barr
-
Best Answer Posted by skirtle
I don't think you need to do anything special with the reader but you'll need to specify mappings on your fields:
http://docs.sencha.com/ext-js/4-0/#!...ld-cfg-mapping
Use @ before an attribute name.
If you can't get it to work then please post the code for your reader and field definitions.
-
10 Oct 2011 4:18 PM #2
I don't think you need to do anything special with the reader but you'll need to specify mappings on your fields:
http://docs.sencha.com/ext-js/4-0/#!...ld-cfg-mapping
Use @ before an attribute name.
If you can't get it to work then please post the code for your reader and field definitions.


Reply With Quote