* Directly get an XMLDOM object loXML=loHTTP.ResponseXML * Check for error IF EMPTY(loXML.XML) MESSAGEBOX(loHTTP.ResponseBody) RETURN ENDIF XMLToCursor(loXML.XML,'Temp') SELECT Temp BROWSEIf the XML object contains an empty cursor, that will make XMLToCursor() to generate an error. Well, the reaction of VFP is quite severe as it closes VFP. It makes sense however that it can't show the cursor as the XML only contains the cursor name. From the server side, I generate the cursor no matter if it contains records or not. On the client side, as the XML contains the cursor name, it will not go into the error which is displaying a messagebox. However, when continuing to XMLToCursor(), a situation occurs as it can't display the cursor. How can I detect if I have an empty cursor? Or, basically, is it better to send the structure all the time when generating the XML so XMLToCursor() will always work even if no record is part of it as it will always knows how to build the cursor from the data structure?