View Full Version : Parse XML reposnse from Ext.data.proxy.Ajax

28 Feb 2012, 5:45 PM
I'm trying to figure out how to parse an XML response from a Ext.data.proxy.Ajax proxy call. I have a scenario where the response can contain different xml tags based on the request, and I need to check for the tags. This proxy is used in conjunction with a Ext.data.XmlReader and data store.I looked in the documentation to see if there was anything I could do in the Ext.data.proxy.Ajax or Ext.data.XmlReader, but wasn't able to apply something that worked.Any ideas what I may be doing wrong?

28 Feb 2012, 5:57 PM
So it's the fields of the model that need to be dynamic correct?

28 Feb 2012, 6:00 PM
Yes, so I could have an xml response like the following:



<msg>Fail to connect to DB</msg>

29 Feb 2012, 10:58 AM
So essentially, there needs to be dynamic population of the model. I'm not sure how this can be done so the xml reader can check for different tags in the xml.

2 Mar 2012, 11:21 AM
I don't mean to bump this post...but was hoping someone who had experience with this could point me in the right direction

2 Mar 2012, 5:10 PM
I don't clearly understand your question but it seems that you want to understand how xml data is parsed and how to do something with it? If so you should read document about Ext.data.reader.Reader and Ext.data.reader.Json. It's better if you read their source codes. Pay attention to read(), getResponseData(), readRecords().