Results 1 to 3 of 3

Thread: how to use xmlreader

  1. #1
    Ext User
    Join Date
    Sep 2010
    Posts
    14
    Vote Rating
    0
      0  

    Default how to use xmlreader

    hi guys,

    I'm finding hard to find out how to use the xmlreader. I simply just want to read the xml file and output it. An example would much be appreciated.Thanks.

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Location
    Sydney, Australia
    Posts
    19,100
    Vote Rating
    969
      0  

    Default

    /examples/carousel2
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

  3. #3
    Ext User
    Join Date
    Sep 2010
    Posts
    14
    Vote Rating
    0
      0  

    Default

    I'm trying to revise the carousel example with my own set of xml data.

    <?xml version="1.0" encoding="UTF-8" ?>
    <resp status="ok">
    <data>test data</data>
    </resp>

    My problem is when I change the code to get my xml data, I can't retrieve the data.
    Here is the part of the code. Hope this may help.

    Ext.regModel('Test', {
    fields: ['data','status']
    });

    var store = new Ext.data.Store({
    model: 'Test',
    proxy: {
    type: 'ajax',
    url: 'test.xml',
    reader: {
    type: 'xml',
    record: 'resp'
    }
    },
    listeners: {
    single: true,
    datachanged: function(){
    Ext.getBody().unmask();
    var items = [];

    store.each(function(rec){
    items.push({
    html: rec.get('data'),
    //cls: 'status' + rec.get('status')
    });
    });

Similar Threads

  1. Replies: 5
    Last Post: 3 Feb 2009, 11:03 AM
  2. XmlReader
    By dilipzin in forum Ext 2.x: Help & Discussion
    Replies: 0
    Last Post: 27 Jan 2009, 10:31 AM
  3. XMLReader
    By jeusdi in forum Ext 2.x: Help & Discussion
    Replies: 1
    Last Post: 19 Dec 2008, 3:30 AM
  4. XmlReader
    By asergey in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 8 May 2008, 7:27 AM
  5. XMLReader
    By mhubert in forum Ext 1.x: Help & Discussion
    Replies: 0
    Last Post: 31 May 2007, 3:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •