At 08:10 AM 21-02-02 -0500, Thomas Bentley (Thom) wrote:
>I have existing data that contains these ASCII control characters and I 
>need to represent them in XML.  Xerces complains about them (because they 
>are less the 0x20), but I need to represent them in a standard way so they 
>can be recreated at a later time, correctly.
>
>Has anyone solved this one?

I'm pretty sure that you will need two passes.  Within CDATA, for instance,
the valid characters are limited to

    #x9 | #xA | #xD | [#x20-#xD7FF] | [#xE000-#xFFFD] | [#x10000-#x10FFFF]

You could represent 0x00 in CDATA by &�.  The first pass
(through Xerces) would convert this to �  Then you'd need to convert
� to 0x00 elsewhere.  Of course you'd need to make sure that &#xxxx;
does not appear normally in your CDATA.

That stated, XML really isn't intended for passing binary information
around.  If you want to put everything in one message, I'd suggest putting
URLs into your XML and wrapping the XML + binary data in one
multipart/mixed message.


                                                        -=- Jerry Carter

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to