Hmmmm.... it doesn't work right for me...
I sort of get the data from SQL Server - it'll have a blank line at the top and an extra ElementType column (which is presumably from the schema).
Here's what I'm doing to test (against SQL Server's Pubs database queried through IIS):
lcSQL = "SELECT au_lname,au_fname,phone FROM Authors " + ;
" WHERE au_lname like 'D%' " + ;
" FOR XML AUTO,ELEMENTS,XMLDATA"
oXML = CREATE("Microsoft.XMLHTTP")
oXML.Open('GET',"http://localhost/pubs?sql=" + ;
URLEncode(lcSQL) + "&root=pubs",.F.)
? oXML.Send()
XMLTOCURSOR(oXML.ResponseText,"Test",0)
RETURN
+++ Rick ---
>>The problem here is that the schema a) is not used by any shipping software (it's the .Net beta 2 single datatable of a dataset schema) b) can't be made to fit any other data. This includes importing data from SQL Server generated by the XML extensions which don't work either.
>
>XMLToCursor works nicely with SQL Server XML, as far as I can tell. Given, I haven't tried every datatype, but what I am using so far works fine. It also works with XML generated by persisting an ADO recordset. What problems are you seeing?
>
>I had been using my own routine to go from ADO XML to a VFP cursor, and when Gene G told me that ADO support had been added to XMLToCursor I realized a _huge_ performance gain.