How to parse xml data getting from web service?

  1. himanshu19890
    Hello friends,
    How are you buddy.I have one more query about sencha touch.I am trying to parse ASP.NETwebservice response(which is in xml format),but no success get yet.The response holds the following xml data:-

              <clientObj xsi:nil="true"/>
              <addressDetailsObj xsi:nil="true"/>         
             <servProvID>d0e8f20a-5293-4a29-9094-28141f63fc78</servProvID><servProvObj xsi:nil="true"/>

    I want to parse the response object.I have checked few forums but did'nt get satisfactory answer.Then i got this and tried its solution like the below.

    <!DOCTYPE html>
        <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>XML Example</title>
            <link rel="stylesheet" type="text/css" href="touch/sencha-touch.css"/>
    		<script type="text/javascript" src="touch/sencha-touch.js"></script>
    		<script type="text/javascript" src="phonegap-1.4.1.js"></script>
    		<script type="text/javascript" src="ext-all/ext-all.js"></script> 
    		<script type="text/javascript" src="ext-all/ext-all-debug.js"></script> 
            <script type="text/javascript">
                new Ext.Application({
                    name: 'xmlexample',
                    launch: function(){
                        Ext.regModel('UsersDataModel', {
                            fields: ['userID','userName','password','lastLoginDate'] //etc...
                        this.stores.profiles = new{
                            model: 'UsersDataModel',
                            implicitIncludes: true,
                            proxy: {
                                type: 'ajax',
                                url : '',
                                reader: {
                                    type  : 'xml',
                                    root  : 'UsersDataModel',
                                    record: 'UsersDataModel'
                    var productTpl = new Ext.XTemplate(
                        '<tpl for=".">',
                            '<div class="data">{userID}</div>',
                            '<div class="data">{userName}</div>',
                    		'<div class="data">{password}</div>',
                            '<div class="data">{lastLoginDate}</div>',
                    new Ext.Panel({
                        fullscreen: true,
                        items: new Ext.DataView({
                            store: this.stores.profiles,
                            tpl: productTpl,
                            itemSelector: 'product-selected'
                            //other config goes here

    But didn't get success to parse the xml data.I am getting the "Cannot read property 'length' of undefined in sencha-touch.js" error while running the above code.Please help me to get rid of the problem .Thanx in advance.
  2. abinkoshy
    can any1 pls help me out with a sample code for extracting data from a json and diplaying it in a list box and storing it
Results 1 to 2 of 2