View Full Version : Fields mapping in Grid's XmlReader

29 May 2007, 10:01 PM

Been experimenting with the Grid of the extjs, all I can say that is I am a bit stuck with the fields mapping in the Grid. From the tutorials and the docs, I can see that the mapping is two level deep that :





<Author>Sidney Sheldon</Author>
<Manufacturer>Warner Books</Manufacturer>
<Title>Master of the Game</Title>

and from the docs

var myReader = new Ext.data.XmlReader({
record: "row", // The repeated element which contains record information
totalRecords: "results", // The element which contains the number of returned records (optional)
id: "id" // The element within the record that provides an ID for the record (optional)
}, myRecordDefinition);

How do I do a simple mapping to the following xml?


29 May 2007, 11:20 PM
Which bit of that documentation is incomprehensible? It seems totally clear from that what you must do.

30 May 2007, 4:17 AM
Sorry, I admit I was a bit clumsy at code sometimes. --"
Given the examples and documentations, it should be clear and now I know how simple what I was trying to achieve. Thanks Animal... :)