[xml] PATCH: implement xmlSaveToBuffer()
- From: Geert Jansen <geert boskant nl>
- To: xml gnome org
- Subject: [xml] PATCH: implement xmlSaveToBuffer()
- Date: Sun, 06 Nov 2005 18:07:52 +0100
Hi,
the attached patch implement the function xmlSaveToBuffer() which was
documented but not implemented.
Can the patch be applied?
Thanks,
Geert Jansen
diff -ur libxml2-2.6.22.orig/xmlsave.c libxml2-2.6.22/xmlsave.c
--- libxml2-2.6.22.orig/xmlsave.c 2005-09-12 17:35:07.000000000 +0200
+++ libxml2-2.6.22/xmlsave.c 2005-11-06 14:59:49.000000000 +0100
@@ -1473,13 +1473,18 @@
* with the encoding and the options given
*
* Returns a new serialization context or NULL in case of error.
+ */
+
xmlSaveCtxtPtr
xmlSaveToBuffer(xmlBufferPtr buffer, const char *encoding, int options)
{
- TODO
- return(NULL);
+ xmlSaveCtxtPtr ret;
+
+ ret = xmlNewSaveCtxt(encoding, options);
+ if (ret == NULL) return(NULL);
+ ret->buf = buffer;
+ return(ret);
}
- */
/**
* xmlSaveToIO:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]