[Expat-discuss] best practice to "XMLify" binary data

Karl Waclawek karl at waclawek.net
Thu Apr 6 22:26:59 CEST 2006


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.


More information about the Expat-discuss mailing list