Results 1 to 2 of 2

Thread: Sencha to Analytic XML?Not display ?why?

  1. #1
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
      0  

    Default 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 - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,556
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    Please edit your post and add in the code tags.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

Posting Permissions

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