3 This file is part of Ext JS 4
5 Copyright (c) 2011 Sencha Inc
7 Contact: http://www.sencha.com/contact
9 GNU General Public License Usage
10 This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
12 If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact.
17 * @class Ext.data.XmlStore
18 * @extends Ext.data.Store
21 * <p>Small helper class to make creating {@link Ext.data.Store}s from XML data easier.
22 * A XmlStore will be automatically configured with a {@link Ext.data.reader.Xml}.</p>
23 * <p>A store configuration would be something like:<pre><code>
24 var store = new Ext.data.XmlStore({
28 url: 'sheldon.xml', // automatically configures a HttpProxy
30 record: 'Item', // records will have an "Item" tag
32 totalRecords: '@TotalResults'
34 // set up the fields mapping into the xml doc
35 // The first needs mapping, the others are very basic
36 {name: 'Author', mapping: 'ItemAttributes > Author'},
37 'Title', 'Manufacturer', 'ProductGroup'
41 * <p>This store is configured to consume a returned object of the form:<pre><code>
42 <?xml version="1.0" encoding="UTF-8"?>
43 <ItemSearchResponse xmlns="http://webservices.amazon.com/AWSECommerceService/2009-05-15">
46 <IsValid>True</IsValid>
47 <ItemSearchRequest>
48 <Author>Sidney Sheldon</Author>
49 <SearchIndex>Books</SearchIndex>
50 </ItemSearchRequest>
52 <TotalResults>203</TotalResults>
53 <TotalPages>21</TotalPages>
55 <ASIN>0446355453</ASIN>
57 http://www.amazon.com/
60 <Author>Sidney Sheldon</Author>
61 <Manufacturer>Warner Books</Manufacturer>
62 <ProductGroup>Book</ProductGroup>
63 <Title>Master of the Game</Title>
67 </ItemSearchResponse>
69 * An object literal of this form could also be used as the {@link #data} config option.</p>
70 * <p><b>Note:</b> This class accepts all of the configuration options of
71 * <b>{@link Ext.data.reader.Xml XmlReader}</b>.</p>
74 Ext.define('Ext.data.XmlStore', {
75 extend: 'Ext.data.Store',
76 alternateClassName: 'Ext.data.XmlStore',
80 * @cfg {Ext.data.DataReader} reader @hide
82 constructor: function(config){
83 config = config || {};
84 config = config || {};
94 this.callParent([config]);