Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replacing Ampersand in a string for XML
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
01662605
Message ID:
01662608
Vues:
37
>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform