I'm having trouble parsing XML content from a web service. The contents simply doesn't show. Please find the detailed explanation below:-
I made an application exactly as described in the "Getting Started with Sencha Touch 2.0" tutorial.
In the 'blog.js' section however, I wanted to parse an XML formatted document, instead of a JSON format.
I typed in the following line of code in the view/Blog.js file:-
When I ran the application, it didn't load the contents of the XML file.
title: 'Recent Posts',
fields: ['BodyPart_ID', 'BodyPart_Name'],
It listed out the following error as was viewed in the inspect element of Chrome:-
XMLHttpRequest cannot load http://home-remedies.chandigarhexcha...art=0&limit=25. Origin http://localhost is not allowed by Access-Control-Allow-Origin.
and a warning:-
[WARN][Ext.data.reader.Reader#process] XML data not found in the response
The fields 'BodyPart_ID' and 'BodyPart_Name' are part of the XML content in the url: http://home-remedies.chandigarhexcha...x/GetAllOrgans, that I used in the code above.
I even tried to put the below meta tags in the "index.html" file:-
<meta http-equiv="Content-Type" content="text/xml; charset=utf-8">
But nothing happened. Same error occurred.
However, if I copied and pasted the contents of the URL in a file with extension '.xml' and then give that name in the url: '' section in the code above, then it displayed the contents fine.
I don't know what more is to be included here.
Please guide me.