Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Wrapping up messages in XML
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
XML, XSD
Divers
Thread ID:
00888363
Message ID:
00888469
Vues:
8
Something like this - Do I need the CHR(13) on the second line in order to ensure the "text" tag starts correctly under the header, or will it get corrected as it arrives at the target (calling program)?
>
>
>  CATCH TO lo_Exception
>    lcErrorMsg='<?xml version = "1.0" encoding="Windows-1252" standalone="yes"?>' + ;
>               CHR(13) + ;
>               '<text>' + ;
>               'Error: '+TRANSFORM(lo_Exception.Errorno)+' - '+lo_Exception.Message+;
>               CHR(13)+;
>               'Line #: '+TRANSFORM(lo_Exception.lineno)+' - '+lo_Exception.linecontents+;
>               CHR(13)+;
>               'Function: '+TRIM(lo_Exception.procedure) + ;
>               '</text>'
>
>    * Used to return meaningful error message to calling program
>    RETURN lcErrorMsg
>


Generally you don't need it except for readability. Most systems should be able to read continuous XML (that is w/o CR or LF) just fine.


Alex Feldstein, MCP, Microsoft MVP
VFP Tips: English - Spanish
Website - Blog - Photo Gallery


"Once again, we come to the Holiday Season, a deeply religious time that each of us observes, in his own way, by going to the mall of his choice." -- Dave Barry
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform