Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
XMLTOCURSOR() and bad characters
Message
De
14/03/2020 15:17:59
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
01673619
Message ID:
01673620
Vues:
49
Dmitry,

Since you're allowing the user to edit or prepare the XML document, there is not much you can do besides error trapping. Using current parsers like MSXML you cannot turn a not well-formed XML document into a well-formed XML document. You would have to write a parser for the effect.

Does the user has to prepare the data for your system in XML?

>Hi,
>
>I am converting a string into a cursor. The string has values entered by the user (so, I have no control). Here is the simple example:
>
>CREATE CURSOR CUR_TEMP (NAME C(20), OV M, NV M)
>XMLTOCURSOR( cAuditDescr, 'CUR_TEMP', 8192 )
>
>
>What happens is the string cAuditDescr could have characters such as a Less-Than (
<
, Ampersand
&
, Greater-Than (
>
). Any of these characters cause a run-time error.
>
>How do you suggest I change the code above to allow the values to be in the cursor ("CUR_TEMP") without a run-time error?
>
>TIA
----------------------------------
António Tavares Lopes
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform