• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

[SOLVED] Ajax response in XML - how to "decode"

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • [SOLVED] Ajax response in XML - how to "decode"

    When doing an Ext.Ajax.request(), in most cases the response is in JSON format and the
    var resp = Ext.decode(response.responseText); works fine.

    If the response is going to be in XML format, of course this won't work. I'm having a hard time figuring out how to do this. All examples for XML are centered around the data being in a store. I've configured stores to use XML fine and have them working.

    But, just a simple Ajax.request response I can't find an example for. Is there an equivalent to Ext.decode() for a XML response?

  • #2
    Bingo!

    success: function(response) {
    var xmlResponse = response.responseXML;
    var device = Ext.DomQuery.selectValue('title',xmlResponse);

    Comment

    Working...
    X