This project has moved and is read-only. For the latest updates, please go here.

xData.responseXML Undefined

Aug 4, 2014 at 5:21 PM

A solution that worked last week suddenly stopped, and I'm not quite sure why. Going through, it appears that the problem lies in parsing the XML data returned by SPServices.
     operation: "GetListItems",
     async: false,
     listName: "Projects",
     CAMLQuery: query,
     completefunc: function (xData, Status)
           //Debug output / function trace. 
           if (window.console) console.log(xData.responseText);
           //Outputs expected responseText.
           //Attempting to log xData.responseXML shows undefined        
                  //Do things here with returned projects.
                  //Code block does not execute.
The list settings should not be blocking any calls as I successfully query the list on other pages.

Attempting to convert the responseText to XML via $.parseXML() throws an invalid XML error. I'm wondering if this could be the root of the problem somehow, but again being able to query the list elsewhere without issue causes some doubt.

Thank you in advance for any assistance.
Aug 4, 2014 at 6:58 PM
I've gotten the solution back to functional by supplying the CAMLViewFields parameter and defining the fields instead of having it pull all default fields.

That being said, I'm not sure what exactly the problem was here. A field with a value that conflicted with well formed XML? Too many fields?

Marked as answer by SP_Joe on 8/4/2014 at 10:58 AM
Aug 10, 2014 at 3:35 AM
It's hard to say because I can't tell what your query was. When you have issues like this, you should look at the data coming back from the call in Firebug or Fiddler to see if there's an error.