Hybrid View

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
    xinyan1007 is on a distinguished road

      0  

    Default Unanswered: Sencha to Analytic XML,Not display ,why?

    Unanswered: Sencha to Analytic XML,Not display ,why?


    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>test rss</title>
    <link rel="stylesheet" href="sencha/resources/css/sencha-touch.css" type="text/css">
    <link rel="stylesheet" href="sencha/examples/guide/css/guide.css" type="text/css">
    <script type="text/javascript" src="sencha/sencha-touch-debug.js"></script>
    <script type="text/javascript">
    Ext.setup({


    onReady: function(){


    Ext.regModel('law',{idProperty: 'id', fields: [{name:'title',type:'string'},{name:'Content',type:'string'}]});

    var xmlStore = new Ext.data.Store({
    model: 'law',
    method: 'GET',
    proxy: {
    url: 'http://localhost:7529/law/2.xml',
    type: 'ajax',
    reader: {
    type: 'xml',
    record: 'Item',
    root: 'list'
    }
    }
    });
    xmlStore.load();

    var xmlList = new Ext.List({
    title: 'xmlList',
    fullscreen: true,
    itemTpl: '<tpl for=".">{values.data.customerPk} - {id}</tpl>',
    store: xmlStore
    });
    var p = new Ext.TabPanel({
    fullscreen: 'true',
    items: [xmlList]
    })

    }
    });
    </script>
    </head>
    <body>


    </body>
    </html>
    xml:

    <?xml version="1.0" encoding="utf-8" ?>
    <law>
    <Item>
    <id>1</id>
    <title> 1 </title>
    <Content> 1 </Content>
    </Item>
    <Item>
    <id>2</id>
    <title> 2 </title>
    <Content> 2 </Content>
    </Item>
    <Item>
    <id>3</id>
    <title> 3</title>
    <Content>3 </Content>
    </Item>
    <Item>
    <id>4</id>
    <title> 4</title>
    <Content>4 </Content>
    </Item>
    <Item>
    <id>5</id>
    <title> 5</title>
    <Content>5 </Content>
    </Item>
    <Item>
    <id>6</id>
    <title> 6</title>
    <Content>6 </Content>
    </Item>
    </law>
    : - ?

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,604
    Answers
    3448
    Vote Rating
    818
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Please edit your post and add in the code tags.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

Thread Participants: 1