Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLTOCURSOR() with invalid characters
Message
From
26/07/2016 18:28:08
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01638686
Message ID:
01638697
Views:
101
>Do I understand that I have to do it when storing the XML? For example, the current code of saving the cursor to XML is:

Fox will do that for you if you mark the fields which may contain binaries as binary, i.e. NOCPTRANS. You don't have to change your tables, just create the cursor so and insert whatever you need into it. Then check the xml and you'll see proper CDATA wrapping.

At least that's what I had to do back in VFP7, but I also think I had to do it a couple of years ago... well, if that 8 doesn't work, try this.

>
>CURSORTOXML( cCursorName, "MyXmlFile.Xml", 1, 512, 0, "" )
>
>
>So I would need to change it to?:
>
>CURSORTOXML( cCursorName, "MyXmlFile.Xml", 1, 512+8, 0, "" )    && I added "8" as per VFP help
>
>
>Thank you.
>
>
>
>>Wrap binary data in CDATA tag
>>>
>>>I am storing an encrypted string into an XML file. But when I try to load this XML into a cursor I get error "An invalid character was found in text content". The code of loading the XML file is:
>>>
>>>XMLTOCURSOR( "MyXmlFile.xml", cCursorName, 512+8192)
>>>
>>>
>>>And this encrypted string is stored in XML using CURSORTOXML(). What do I need to do when storing or loading this stgring to make it work?
>>>
>>>TIA

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform