>>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?
No, I just tried it, as you suggested, and I get error when processing the memory string.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham