Results 1 to 6 of 6

Thread: Parse XML reposnse from Ext.data.proxy.Ajax

  1. #1
    Sencha User
    Join Date
    Nov 2011
    Posts
    11

    Default Parse XML reposnse from Ext.data.proxy.Ajax

    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?

  2. #2
    Sencha Premium User mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    40,379
    Answers
    3997

    Default

    So it's the fields of the model that need to be dynamic correct?
    Mitchell Simoens @LikelyMitch

    Check out my GitHub:
    https://github.com/mitchellsimoens

    Posts are my own, not any current, past or future employer's.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Posts
    11

    Default

    Yes, so I could have an xml response like the following:

    <sencha>
    <extjs>success</extjs>
    </sencha>
    or

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

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Posts
    11

    Default

    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.

  5. #5
    Sencha User
    Join Date
    Nov 2011
    Posts
    11

    Default

    I don't mean to bump this post...but was hoping someone who had experience with this could point me in the right direction

  6. #6
    Sencha User
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    347

    Default

    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().

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •