Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
XMLTOCURSOR() with invalid characters
Message
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9 SP2
Miscellaneous
Thread ID:
01638686
Message ID:
01638731
Views:
89
Thank you, Rick. Never before used the type W.

>XML does not support binary string data, so if you plan on encoding memo fields that contain sub char(32) characters you need to convert those fields to BLOB fields (CAST(val AS W)) so that they are base64 encoded when converted to XML.
>
>
>CREATE CURSOR temp (val w)
>INSERT INTO temp val VALUES (CHR(10) + CHR(15) )
>lcXml = ""
>? CURSORTOXML("Temp","lcXml")
>
>
>
>which produces:
>
>
><?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>
><VFPData>
>	<temp>
>		<val>Cg8=</val>
>	</temp>
></VFPData>
>
>
>+++ Rick ---
>
>>Hi,
>>
>>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
"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
Previous
Reply
Map
View

Click here to load this message in the networking platform