Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Wrapping up messages in XML
Message
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
00888363
Message ID:
00888469
Views:
7
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
Previous
Reply
Map
View

Click here to load this message in the networking platform