diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2005-02-23 14:05:37 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2005-02-23 14:05:37 +0000 |
commit | 614fdc13b7d073b6732fff5bb2baf16ef2ade18d (patch) | |
tree | f4a03300bb55b3c9eb70e47d5fdc92b05e2ffdf2 /xmlwriter.c | |
parent | 12d37ab63441baf9e03db70168cc1d0d6f1c2373 (diff) | |
download | android_external_libxml2-614fdc13b7d073b6732fff5bb2baf16ef2ade18d.tar.gz android_external_libxml2-614fdc13b7d073b6732fff5bb2baf16ef2ade18d.tar.bz2 android_external_libxml2-614fdc13b7d073b6732fff5bb2baf16ef2ade18d.zip |
applied a patch from Rob Richards fixing a couple of bugs in the writer
* xmlwriter.c: applied a patch from Rob Richards fixing a couple
of bugs in the writer
Daniel
Diffstat (limited to 'xmlwriter.c')
-rw-r--r-- | xmlwriter.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmlwriter.c b/xmlwriter.c index 8a4dec63..76d7549c 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -936,6 +936,12 @@ xmlTextWriterStartElement(xmlTextWriterPtr writer, const xmlChar * name) return -1; case XML_TEXTWRITER_NONE: break; + case XML_TEXTWRITER_ATTRIBUTE: + count = xmlTextWriterEndAttribute(writer); + if (count < 0) + return -1; + sum += count; + /* fallthrough */ case XML_TEXTWRITER_NAME: count = xmlOutputBufferWriteString(writer->out, ">"); if (count < 0) @@ -1839,8 +1845,8 @@ xmlTextWriterEndAttribute(xmlTextWriterPtr writer) np = (xmlTextWriterNsStackEntry *) xmlLinkGetData(lk); if (np != 0) { - namespaceURI = xmlStrdup(np->prefix); - prefix = xmlStrdup(np->uri); + namespaceURI = xmlStrdup(np->uri); + prefix = xmlStrdup(np->prefix); } xmlListPopFront(writer->nsstack); |