Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLToCursor Error
Message
From
04/05/2006 12:07:33
 
 
To
04/05/2006 10:50:13
Jay Johengen
Altamahaw-Ossipee, North Carolina, United States
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01119184
Message ID:
01119233
Views:
31
This message has been marked as the solution to the initial question of the thread.
Jay,

Try this:
XMLTOCURSOR(XMLTest,'crsXMLCursor',2048)
(Removed the quotes from around your variable name.) Because you had it enclosed in quotes, the function thinks that the XML you want it to interpret consists of just the 7 characters: "XMLTest". Because it can't find the usual XML identifying info within your 7 characters, it throws the error. Same error happens if you put a filename in quotes as the first param and then forget the 512 flag.

>This works when I set it up to use a file, but having trouble using a variable. Must be my flags or something, but I get an error when it tries to do the XMLTOCURSOR in the procedure. Error is: XML Parse Error: Invalid at the top level...
>
>The top couple lines of the XML variable is:
>
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData>
>	<xsd:schema id="VFPData" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>
>
>Code that's relevant:
>
>
>m.XML = CURSORTOXML('AcctValTest','XMLTest',2,1,0,'1')
>
>DO p_CreateCursorFromXML WITH m.XMLTest
>
>
>
>PROCEDURE p_CreateCursorFromXML
>
>	PARAMETERS XMLTest
>
>	XMLTOCURSOR('XMLTest','crsXMLCursor',2048)
>
David Stevenson, MCSD, 2-time VFP MVP / St. Petersburg, FL USA / david@topstrategies.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform