diff options
-rw-r--r-- | include/libxml/xmlwriter.h | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | python/setup.py | 0 | ||||
-rw-r--r-- | xmlwriter.c | 20 |
3 files changed, 24 insertions, 0 deletions
diff --git a/include/libxml/xmlwriter.h b/include/libxml/xmlwriter.h index 91e683c8..9cb75f6b 100644 --- a/include/libxml/xmlwriter.h +++ b/include/libxml/xmlwriter.h @@ -471,6 +471,10 @@ extern "C" { xmlTextWriterSetIndentString(xmlTextWriterPtr writer, const xmlChar * str); + XMLPUBFUN int XMLCALL + xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar); + + /* * misc */ diff --git a/python/setup.py b/python/setup.py index 7cb8bfce..7cb8bfce 100755..100644 --- a/python/setup.py +++ b/python/setup.py diff --git a/xmlwriter.c b/xmlwriter.c index b3e85fa5..4acd2fd5 100644 --- a/xmlwriter.c +++ b/xmlwriter.c @@ -4610,6 +4610,26 @@ xmlTextWriterSetIndentString(xmlTextWriterPtr writer, const xmlChar * str) } /** + * xmlTextWriterSetQuoteChar: + * @writer: the xmlTextWriterPtr + * @quotechar: the quote character + * + * Set the character used for quoting attributes. + * + * Returns -1 on error or 0 otherwise. + */ +int +xmlTextWriterSetQuoteChar(xmlTextWriterPtr writer, xmlChar quotechar) +{ + if ((writer == NULL) || ((quotechar != '\'') && (quotechar != '"'))) + return -1; + + writer->qchar = quotechar; + + return 0; +} + +/** * xmlTextWriterWriteIndent: * @writer: the xmlTextWriterPtr * |