Re: [xml] Newline handling

On Tue, May 20, 2008 at 05:31:01PM +0200, Piotr Gaczkowski wrote:
On Tue, May 20, 2008 at 5:01 PM, Daniel Veillard <veillard redhat com> wrote:
On Tue, May 20, 2008 at 04:22:58PM +0200, Piotr Gaczkowski wrote:

binary data in XML is impossible in general. And even if the xmlTextWriter
did not tweak newline on output any conformant XML parser will normalize
at parse time, it's mandatory from the spec
You're trying to use the wrong tool, read the spec. Or UUencode your

It's not that way. Actually I don't want to create XML stream
containing binary data, but write _only_ raw binary data, (ab)using
the xmlTextWriter API.

The program I'm writing was supposed to only return data in XML, but
there is a need now to return binaries in some cases. xmlTextWriter is
still the only interface to the world, so I'm trying to push those
BLOBs through it.

  Hum, very weird. Let's face it those entry points were not designed
for that.

But maybe you're right and UUEncoding could be used instead.

  Maybe you can find another encoding which is less verbose while still
safe for use.


Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]