On Fri, Aug 28, 2009 at 12:43:22PM +0200, LAUN, Wolfgang wrote:
> Currently I'm using xml_save_format_file_enc and
> xml_doc_dump_memory_enc. But for a certain application I'd like to
> write, either to stdout or into a memory buffer, a chunk of XML from a
> document tree, but *without the <?xml?> header*. I have looked into
> several API sections, and it seems that the only way to get XML text
> without the header is to dump the tree to a memory buffer. Or is there
> some way to set this option for the previously mentioned high-level
> function?

  Use the xmlsave.h APIs and pass the XML_SAVE_NO_DECL option when
creating the saving context, that should do it. Note that it's dangerous
if you happen to save in an encoding different from UTF-8.

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
dan...@veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/
_______________________________________________
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
http://mail.gnome.org/mailman/listinfo/xml

Reply via email to