mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
fixed #145092 by adding an xmlSaveOption to omit XML declaration Daniel
* xmlsave.c include/libxml/xmlsave.h: fixed #145092 by adding an xmlSaveOption to omit XML declaration Daniel
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
Mon Aug 8 16:43:04 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* xmlsave.c include/libxml/xmlsave.h: fixed #145092 by adding
|
||||
an xmlSaveOption to omit XML declaration
|
||||
|
||||
Mon Aug 8 15:44:54 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||
|
||||
* HTMLtree.c: fixed bug #310333 with a patch close to the provided
|
||||
|
||||
@@ -27,7 +27,8 @@ extern "C" {
|
||||
* to the xmlSaveToFd() and similar calls.
|
||||
*/
|
||||
typedef enum {
|
||||
XML_SAVE_FORMAT = 1<<0 /* format save output */
|
||||
XML_SAVE_FORMAT = 1<<0, /* format save output */
|
||||
XML_SAVE_NO_DECL = 1<<1 /* drop the xml declaration */
|
||||
} xmlSaveOption;
|
||||
|
||||
|
||||
|
||||
@@ -826,6 +826,7 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
|
||||
cur->encoding = BAD_CAST ctxt->encoding;
|
||||
|
||||
buf = ctxt->buf;
|
||||
if ((ctxt->options & XML_SAVE_NO_DECL) == 0) {
|
||||
xmlOutputBufferWrite(buf, 14, "<?xml version=");
|
||||
if (cur->version != NULL)
|
||||
xmlBufferWriteQuotedString(buf->buffer, cur->version);
|
||||
@@ -851,6 +852,7 @@ xmlDocContentDumpOutput(xmlSaveCtxtPtr ctxt, xmlDocPtr cur) {
|
||||
break;
|
||||
}
|
||||
xmlOutputBufferWrite(buf, 3, "?>\n");
|
||||
}
|
||||
|
||||
#ifdef LIBXML_HTML_ENABLED
|
||||
dtd = xmlGetIntSubset(cur);
|
||||
|
||||
Reference in New Issue
Block a user