Re: [xml] "Write" equivalent to xmlReadMemory?
- From: Daniel Veillard <veillard redhat com>
- To: Thomas Hauk <thauk ualberta net>
- Cc: xml gnome org
- Subject: Re: [xml] "Write" equivalent to xmlReadMemory?
- Date: Mon, 30 Jun 2008 03:45:45 -0400
On Fri, Jun 27, 2008 at 02:19:16PM -0700, Thomas Hauk wrote:
Hello all,
I'm doing some quick research to determine if libxml2 is appropriate
for our use on an embedded device. We want to parse XML documents
which are already in memory (present in a file system that saves files
into flash memory) and also write them back to memory (we already have
an area of flash set aside as a buffer for when writing files to the
device I can use).
I noticed there is xmlReadMemory. Is there also some xmlWriteMemory
equivalent? I can't find it in the documentation, nor by searching
this mailing list's archives.
in general use xmlsave:
http://xmlsoft.org/html/libxml-xmlsave.html
see xmlSaveToBuffer()
Also, I know libxml2 does dynamic memory allocation, which isn't
possible on our device, but I already have a plan to implement a small
"allocator", whose name I can swap into the line of "xmlMallocFunc
xmlMallocAtomic = (xmlMallocFunc) malloc;" in place of malloc, but is
there an easier way to do this?
Proper way to override the memory routines fro your ovwn allocator
is to use xmlMemSetup() or xmlGcMemSetup()
http://xmlsoft.org/html/libxml-xmlmemory.html#xmlMemSetup
please read http://xmlsoft.org/xmlmem.html
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]