Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6115963
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:09:08+00:00 2026-05-23T15:09:08+00:00

Ext.Ajax.request({ url: ‘http://bar.com/api/foos/’, success: function(response, opts) { // How parse the response containing the

  • 0
Ext.Ajax.request({
  url: 'http://bar.com/api/foos/',
  success: function(response, opts) {
    // How parse the response containing the XML?
  }
});

I tried fiddling around with XmlReader but didn’t get too far.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T15:09:08+00:00Added an answer on May 23, 2026 at 3:09 pm

    I’m really new to Sencha Touch but I’ve got an XML to read and display ok, the problem I had was that you can’t access cross domain xml’s (although I’ve heard if you compile in PhoneGap there is a way), so I put all my files in the same location and parsed the XML with a PHP script on my server (in turn keeping it local). See the example below:

    <!DOCTYPE html>
    <html>
        <head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">
            <title>XML Example</title>
            <script src="../sencha-touch-debug.js" type="text/javascript">
            </script>
            <link href="../resources/css/sencha-touch.css" rel="stylesheet" type="text/css">
            <script type="text/javascript">
                new Ext.Application({
                    name: 'xmlexample',
                    launch: function(){
                        Ext.regModel('Profile', {
                            fields: ['nobea','nobeb','nodec','noded'] //etc...
                        });
    
                        this.stores.profiles = new Ext.data.Store({
                            model: 'Profile',
                            autoLoad:true,
                            implicitIncludes: true,
                            proxy: {
                                type: 'ajax',
                                url : 'http://www.yourwebsite.co/php/xmlparse.php?url=http://externalxmllink',
                                reader: {
                                    type  : 'xml',
                                    root  : 'profile',
                                    record: 'profile'
                                }
                            }
                        });
                    var productTpl = new Ext.XTemplate(
                        '<tpl for=".">',
                            '<div class="data">{nobea}</div>',
                            '<div class="data">{nobeb}</div>',
                    '<div class="data">{nobec}</div>',
                            '<div class="data">{nobed}</div>',
                        '</tpl>'
                    );    
                    new Ext.Panel({
                        fullscreen: true,
                        items: new Ext.DataView({
                            store: this.stores.profiles,
                            tpl: productTpl,
                            itemSelector: 'product-selected'
                            //other config goes here
                        })
                    });
                }
            });        
            </script>
        </head>
        <body>
        </body>
    </html>
    

    So the sample XML file would look like:

    <?xml version="1.0" encoding="utf-8"?>
    <profile>
    <nodea>text</nodea>
    <nodeb>text</nodeb>
    <nodec>text</nodec>
    <noded>text</noded>
    </profile>
    

    And here is the xmlparse.php

    <?php
    // Set your return content type
    header('Content-type: application/xml');
    
    // Website url to open
    //$daurl = 'http://YOURXMLLINK';
    $daurl = $_GET['url'];
    
    // Get that website's content
    $handle = fopen($daurl, "r");
    
    // If there is something, read and return
    if ($handle) {
        while (!feof($handle)) {
            $buffer = fgets($handle, 4096);
            echo $buffer;
        }
        fclose($handle);
    }
    ?>
    

    Hope this helps 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

function workprogress(){Ext.Ajax.request({ url: 'communication.php', success: noWork, failure: yesWork });} function noWork() { infoWindow.hide(); }
I have a problem with using Ajax. function GetGrantAmazonItemCnt(){ var cnt; Ext.Ajax.request({ url :
Ext.Ajax.request({url:'DeleteAction',success: doneFunction,failure: errorFunction,params:{name:rname}}); The above code is my Ajax request which goes to DeleteAction
How can I make an AJAX request using Ext JS and have the response
function symbol_handler(){ fp.getForm().submit({ url:'/index.php/ajax/test_function', success:function(resp){ //how would i access attributes of the json object?
I have an ajax request sending some data to a php file: Ext.Ajax.request({ url:
I need to set an ajax request with a generated url. Ext.define('Cc.store.Absences', { extend:
I use Ext.form.ComboBox in very similar way as in this example: http://extjs.com/deploy/dev/examples/form/forum-search.html What annoys
I simply am trying to update local storage but inside the Ext.Ajax.request I cant
I've created an AJAX request in a function. However, I am not sure how

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.