3 * @class Ext.data.XmlStore
4 * @extends Ext.data.Store
7 * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
8 * A XmlStore will be automatically configured with a {@link Ext.data.reader.Xml}.</p>
9 * <p>A store configuration would be something like:<pre><code>
10 var store = new Ext.data.XmlStore({
14 url: 'sheldon.xml', // automatically configures a HttpProxy
16 record: 'Item', // records will have an "Item" tag
18 totalRecords: '@TotalResults'
20 // set up the fields mapping into the xml doc
21 // The first needs mapping, the others are very basic
22 {name: 'Author', mapping: 'ItemAttributes > Author'},
23 'Title', 'Manufacturer', 'ProductGroup'
27 * <p>This store is configured to consume a returned object of the form:<pre><code>
28 <?xml version="1.0" encoding="UTF-8"?>
29 <ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
32 <IsValid>True</IsValid>
33 <ItemSearchRequest>
34 <Author>Sidney Sheldon</Author>
35 <SearchIndex>Books</SearchIndex>
36 </ItemSearchRequest>
38 <TotalResults>203</TotalResults>
39 <TotalPages>21</TotalPages>
41 <ASIN>0446355453</ASIN>
43 http://www.amazon.com/
46 <Author>Sidney Sheldon</Author>
47 <Manufacturer>Warner Books</Manufacturer>
48 <ProductGroup>Book</ProductGroup>
49 <Title>Master of the Game</Title>
53 </ItemSearchResponse>
55 * An object literal of this form could also be used as the {@link #data} config option.</p>
56 * <p><b>Note:</b> Although not listed here, this class accepts all of the configuration options of
57 * <b>{@link Ext.data.reader.Xml XmlReader}</b>.</p>
59 * @param {Object} config
62 Ext.define('Ext.data.XmlStore', {
63 extend: 'Ext.data.Store',
64 alternateClassName: 'Ext.data.XmlStore',
68 * @cfg {Ext.data.DataReader} reader @hide
70 constructor: function(config){
71 config = config || {};
72 config = config || {};
82 this.callParent([config]);