Re: best practice to "XMLify" binary data
"Stefan Momma" <[email protected]>
| Newsgroups | gmane.text.xml.expat.general |
|---|---|
| Message-ID | <[email protected]> |
> From: Karl Waclawek <[email protected]> > To: Stefan Momma <[email protected]> > Cc: [email protected] > Subject: Re: [Expat-discuss] best practice to "XMLify" binary data > Date: Thu, 06 Apr 2006 16:26:59 -0400 > > Stefan Momma wrote: > > We have the following situation: > > > > XML documents are generated by an application, and sometimes there are > > binary characters embedded somewhere inside a CDATA section of the > > document > > which are not valid UTF-8. > > These XML data are parsed using expat in a different application. > > > > Is there a "best practice" what to do as the final step in the XML > > generation process to manipulate the data such that they do not end up > > with > > invalid token errors for this material inside CDATA? We want to retain > > as > > much as possible of the original data, so some kind of replacement > > representation would be helpful. Which tools can you recommend for that > > task? > > > > > Use base64 encoding. > If I want to keep the valid data human readable, and just protect/encapsulate/encode the invalid parts, what would be the best tool to achieve that? I found ICU's uconv, which has a substitute option, and will test that. Any other options? -s. -- -- stefan momma -- johannesstrasse 7 -- 70794 filderstadt-bernhausen -- [email protected] Echte DSL-Flatrate dauerhaft für 0,- Euro*! "Feel free" mit GMX DSL! http://www.gmx.net/de/go/dsl _______________________________________________ Expat-discuss mailing list [email protected] http://mail.libexpat.org/mailman/listinfo/expat-discuss