Re: [xml] Newline handling



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
 http://www.w3.org/TR/REC-xml/#sec-line-ends
You're trying to use the wrong tool, read the spec. Or UUencode your
data.

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.

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

-- 
Cheers,
Piotr Gaczkowski



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