Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Problem with using XmlAdapter
Message
 
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Environment versions
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01016566
Message ID:
01016580
Views:
22
>I ran into the following problem. I copy an XML file from a Pocket PC to a memory variable on the Desktop. Then I try to load this XML into the XML adapter with the following code:
>
>oXml = CREATEOBJECT("XMLAdapter")
>oXml.LoadXML( cMyXmlString, .F. )
>
>
>I get error:
>
>XML Error: XML Parse Error: Invalid at the top level of the
>document, line 1, Position 1, " <VFPDataSet><xs:schema id="VFPDATASET" xmlns=""
>
>
>But if I store the string first into a file and then load the file into XML Adapter, no problem. Like this:
>
>
>STRTOFILE( cMyXmlString, "MYXMLFILE.XML" )
>oXml = CREATEOBJECT("XMLAdapter")
>oXml.LoadXML( "MYXMLFILE.XML", .T. )
>
>
>No error message here.
>
>What I am doing wrong when loading the string into XML Adapter?

Dmitry,

Would it work if you read XML back into string with FILETOSTR() and pass to XMLAdapter?
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform