Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replacing Ampersand in a string for XML
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01662605
Message ID:
01662609
Views:
34
>>Hi,
>>
>>My code converts a string (field of a cursro) to an XML string and to a cursor. And if the string contains an ampersand sign (&), the process fails.
>>
>>This is the segment of the code:
>>
>>cAuditDescr = '<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?><Changes>' +
>>ALLTRIM(C_POAUDIT.AUDIT_DESC) + '</Changes>'
>>XMLTOCURSOR( cAuditDescr, 'CUR_TEMP', 8192 )
>>
>>The error happens on the line XMLTOCURSOR() when the string AUDIT_DESC has an ampersand. I can pre-process the entry and either strip all occurrences of ampersand or replace it? Getting rid is pretty straight forward. But if I want to replace it, what character should be used?
>>
>>TIA
>
>
>&amp;
>
Thank you.
"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