30 writer->_stream.write(buffer, len);
44 _writer = xmlNewTextWriter(_out_buf);
49 xmlFreeTextWriter(_writer);
54 if (xmlTextWriterStartDocument(_writer, NULL, encoding, NULL) < 0) {
61 if (xmlTextWriterEndDocument(_writer) < 0) {
68 if (xmlTextWriterStartElement(_writer, BAD_CAST name.c_str()) < 0) {
75 if (xmlTextWriterWriteAttribute(_writer, BAD_CAST name.c_str(), BAD_CAST value.c_str()) < 0) {
82 if (xmlTextWriterWriteComment(_writer, BAD_CAST comment.c_str()) < 0)
90 if (xmlTextWriterEndElement(_writer) < 0)
98 if (xmlTextWriterWriteRaw(_writer, BAD_CAST data.c_str()) < 0)
106 if (xmlTextWriterWriteRawLen(_writer, BAD_CAST data, len) < 0)