Re: [xml] XmlSaveToBuffer - how to use it to save an XmlDoc out to a buffer?
- From: Daniel Veillard <veillard redhat com>
- To: Mary Albanese <mary albanese comcast net>
- Cc: xml gnome org
- Subject: Re: [xml] XmlSaveToBuffer - how to use it to save an XmlDoc out to a buffer?
- Date: Sat, 31 Jan 2009 08:26:50 +0100
On Tue, Jan 27, 2009 at 02:40:51PM -0500, Mary Albanese wrote:
dd
Daniel suggested using the XML_SAVE_NO_EMPTY flag... But how? And when?
Do I use
[...]
xmlSaveToBuffer instead of xmlDocDumpFormatMemory???? I tried the following
and it didn't work...
XmlDocPtr
doc=htmlReadMemory([xhtmlAsDatabytes],[xhtmlAsDatalength],"",NULL,
HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR)
...do a bunch of changes to doc...
xmlbuffNew = xmlBufferCreate();
xmlSaveToBuffer(xmlbuffNew, NULL, XML_SAVE_NO_EMPTY);
Well if you don't give the document to any saving function, and
don't save the returned value from xmlSaveToBuffer I fail to see how
you can expect to see a dump from the document...
xmlBufferCreate, xmlSaveToBuffer, xmlSaveDoc, xmlSaveClose
http://xmlsoft.org/html/libxml-xmlsave.html#xmlSaveDoc
Daniel
--
Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
daniel veillard com | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library http://libvirt.org/
[
Date Prev][Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]