diff options
author | Daniel Veillard <veillard@redhat.com> | 2012-07-16 14:54:45 +0800 |
---|---|---|
committer | Daniel Veillard <veillard@redhat.com> | 2012-07-23 14:24:27 +0800 |
commit | dbf5411b21cbf5f0f72283a3ff4d4df38afa9990 (patch) | |
tree | ed6e9529e5470238cb42a9d6998324289cf785ab /xmlwriter.c | |
parent | 8aebce3ec62c4ebd0862ae438c2ae4330755b8d0 (diff) | |
download | android_external_libxml2-dbf5411b21cbf5f0f72283a3ff4d4df38afa9990.tar.gz android_external_libxml2-dbf5411b21cbf5f0f72283a3ff4d4df38afa9990.tar.bz2 android_external_libxml2-dbf5411b21cbf5f0f72283a3ff4d4df38afa9990.zip |
Convert the writer to new output buffer and save APIs
Only a handful of places had to be converted for xmlBuf and
the new saving entry point.
Diffstat (limited to 'xmlwriter.c')
-rw-r--r-- | xmlwriter.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmlwriter.c b/xmlwriter.c index 11b15e03..b3e85fa5 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -21,6 +21,10 @@ #include <libxml/xmlwriter.h> +#include "buf.h" +#include "enc.h" +#include "save.h" + #define B64LINELEN 72 #define B64CRLF "\r\n" @@ -548,9 +552,9 @@ xmlTextWriterStartDocument(xmlTextWriterPtr writer, const char *version, writer->out->encoder = encoder; if (encoder != NULL) { if (writer->out->conv == NULL) { - writer->out->conv = xmlBufferCreateSize(4000); + writer->out->conv = xmlBufCreateSize(4000); } - xmlCharEncOutFunc(encoder, writer->out->conv, NULL); + xmlCharEncOutput(writer->out, 1); if ((writer->doc != NULL) && (writer->doc->encoding == NULL)) writer->doc->encoding = xmlStrdup((xmlChar *)writer->out->encoder->name); } else @@ -1501,8 +1505,8 @@ xmlTextWriterWriteString(xmlTextWriterPtr writer, const xmlChar * content) break; case XML_TEXTWRITER_ATTRIBUTE: buf = NULL; - xmlAttrSerializeTxtContent(writer->out->buffer, writer->doc, - NULL, content); + xmlBufAttrSerializeTxtContent(writer->out->buffer, + writer->doc, NULL, content); break; default: break; |