Good evening everyone!

All of the example EXTJs XML/grid examples use the Books, ISBN, ASIN number example. I have some XML that's a little more complex, and I don't know how to map these items to the grid fields. Any advice?

Examples I see:
Code:
<Item>
<ASIN>0446355453</ASIN>
−
<DetailPageURL>

                http://www.amazon.com/gp/redirect.html%3FASIN=0446355453%26tag=ws%26lcode=xm2%26cID=2025%26ccmID=165953%26location=/o/ASIN/0446355453%253FSubscriptionId=1A7XKHR5BYD0WPJVQEG2
            
</DetailPageURL>
−
<ItemAttributes>
<Author>Sidney Sheldon</Author>
<Manufacturer>Warner Books</Manufacturer>
<ProductGroup>Book</ProductGroup>
<Title>Master of the Game</Title>
</ItemAttributes>
</Item>
maps like:
Code:
reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'Item',
id: 'ASIN',
totalRecords: '@total'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
{name: 'Author', mapping: 'ItemAttributes > Author'},
'Title',
'Manufacturer',
'ProductGroup',
// Detail URL is not part of the column model of the grid
'DetailPageURL'
])
I have something like:
Code:
<buildings>
<building>
  <floor name="firstfloor" display="First Floor">
    <field_name name="sqfootage" display="100 sq ft"/>
    <field_name name="height" display="9ft"/>
  </floor>
  <floor name="basement" display="Sub Zero Floor">
    <field_name name="sqfootage" display="200 sq ft"/>
    <field_name name="height" display="12ft"/>
  </floor>
</building

</buildings>
That should get me going where I need to go. In Jquery, it's would map like this:
building.find('building") for each building..
then to get the first floor data it would be something like:
floor.find('floor[name="firstfloor"]').find('field_name[name="height"]').text() or somethingl ike that, to get the height of each floor..

how would I accomplish that in an XMLReader, to get a row for each 'building', and an attribute in each row that maps to the 'firstfloor' height attribute... and it has to be by 'value' of the 'name' attribute, not an index.

and I don't know how to map it.