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:
01662608
Views:
36
>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;
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform