Re: [xml] final output filtering?



On Sat, Jun 07, 2003 at 11:26:58AM -0400, Chris Ryland wrote:
Is there any straightforward way to provide an in-line "output filter" 
for the tree output routines such as xmlDocDumpFormatMemory() or 
xmlSaveFile() (other than going back and reading and rewriting the 
output results, of course ;-), so that I can convert the Unix 
line-endings to platform-appropriate line-endings (Windows, Mac OS), 
and do any other post-processing like that?

  an XML serializer should NOT do any such kind of changes. Yes you
will have to postprocess the output if you really want this but
again this should NOT be done, you're *modifying the content*.

xmlIO looks promising, but I don't see any direct way to use that with 
the tree saving machinery.

  it's possible at the C level. 

Could I do something tricky like define my own output encoding 
("myUTF-8") and do the work there? But I guess that would limit the 
user's choice of output encodings to mine. Hmm...

  and you would end-up with an encoding="myUTF-8"
In a nutshell "don't do that !"

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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