Re: [xml] Using Doc Saving Context Options when dumping doc.
- From: Daniel Veillard <veillard redhat com>
- To: Dan Ryan <dan dolphtech com>
- Cc: xml gnome org
- Subject: Re: [xml] Using Doc Saving Context Options when dumping doc.
- Date: Wed, 2 May 2007 12:54:57 -0400
On Tue, May 01, 2007 at 01:14:42PM -0400, Dan Ryan wrote:
Using Doc Saving Context Options to xmlDocDumpMemory( )
How do you omit the XML Declaration and Empty Element nodes
when dumping a document from memory?
Libxml2-2.6.2x provides the capability to output an XML document that
has been loaded, parsed, and stored in memory. The XmlNodeDump and
xmlDocDumpMemory functions will dump the document to a buffer.
However, in certain cases I do "not" want to output the XML Declaration
and Empty Elements as a single empty-node (i.e. <empty/> ).
Do not use the old API, but the new xmlSave stuff
http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveOption
http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveToBuffer
read the functions in that module
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
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]