Results 1 to 5 of 5

Thread: ext.domquery.isxml is undefined

    Success! Looks like we've fixed this one. According to our records the fix was applied for TOUCH-1059 in a recent build.
  1. #1
    Sencha User
    Join Date
    Nov 2011
    Location
    Jena
    Posts
    39
    Vote Rating
    0
      0  

    Default ext.domquery.isxml is undefined

    Hi,

    while trying to parse xml through an ajax proxy, i'm getting this error:
    Uncaught TypeError: Object [object Object] has no method 'isXml'
    As far as i understand, "ext.domquery.isxml" isn't even defined.

    related code segment:
    Code:
     model: 'app.models.Category',
     autoLoad: false,
     proxy: {
         type: 'ajax',
         url: 'test.xml',
         reader: {
             type: 'xml',
             root: 'items',
             record: 'item'
         }
     }
    any ideas?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,422
    Vote Rating
    1271
      0  

    Default

    What does your XML look like?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Nov 2011
    Location
    Jena
    Posts
    39
    Vote Rating
    0
      0  

    Default

    "items" isn't exactly the first tag in my xml file, but the logical root to the records. Changing root to first tag in the xml file fixes the problem, because i'm getting around entering the else branch.

    Code:
    <category>
        <category_info>
            stuff...
        </category_info>
        <items>
            <item>
                stuff...
            </item>
            <item>
                stuff...
            </item>
        </items>
    </category

  4. #4
    Sencha User
    Join Date
    Nov 2011
    Location
    Jena
    Posts
    39
    Vote Rating
    0
      0  

    Lightbulb

    looks like it's a bug!

    changing:
    Code:
            } else if (Ext.DomQuery.isXml(data)) {
                // This fix ensures we have XML data
                // Related to TreeStore calling getRoot with the root node, which isn't XML
                // Probably should be resolved in TreeStore at some point
                return Ext.DomQuery.selectNode(root, data);
            }
    to:
    Code:
            } else {
                // This fix ensures we have XML data
                // Related to TreeStore calling getRoot with the root node, which isn't XML
                // Probably should be resolved in TreeStore at some point
                return Ext.DomQuery.selectNode(root, data);
            }
    in "sencha-touch-all-debug-w-comments.js" does the trick for me!

  5. #5
    Sencha - Sencha Touch Dev Team rdougan's Avatar
    Join Date
    Oct 2008
    Posts
    1,159
    Vote Rating
    7
      0  

    Default

    It seems isXml didn't get into Touch's version of DomQuery.
    Sencha Inc.
    Robert Dougan - @rdougan
    Sencha Touch 2 and Ext JS 4 Core Team Member, SASS/Theming Wizard.

Posting Permissions

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