View Full Version : Read XML data from .page

11 Sep 2012, 1:20 AM
I am trying to read xml data from a .page and getting success as false, with reader type as xml.

proxy: {
type : 'ajax',
headers: {'Content-Type': 'application/x-www-form-urlencoded'},
url : 'data/fundProviderList.page',
appendId: true,
noCache : false,
directionParam : '',
filterParam : '',
groupParam : '',
limitParam : '',
pageParam : '',
sortParam : '',
startParam : '',
reader: {
type: 'xml',
root: 'root.screener_info',
record: 'urls'

actionMethods: {
create: "POST",
read: "POST",
update: "POST",
destroy: "POST"

Please can any one suggest what can be done.

11 Sep 2012, 6:06 AM
I think the Content-Type header you're using is telling the server-side to always expect form-encoded data. Try commenting this out.

Next, try calling the 'http://yourHost/yourAppContext/data/fundProviderList.page' URL from your browser's address bar and see if you get the expected data.

11 Sep 2012, 11:57 PM
Thanks for the reply.

I have tried the below changes but was of no help.

The .page had xml content in it, i guess it is just the extension it is making a problem

12 Sep 2012, 8:55 PM
If i replace the content of the .page from xml to json, it is working fine.