mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
patch from Richard Jinks for XPath substring() function new set of tests
* xpath.c: patch from Richard Jinks for XPath substring() function * result/XPath/expr/strings test/XPath/expr/strings: new set of tests Daniel
This commit is contained in:
21
tree.c
21
tree.c
@ -6986,16 +6986,17 @@ xmlSetCompressMode(int mode) {
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlDocDump:
|
||||
* xmlDocFormatDump:
|
||||
* @f: the FILE*
|
||||
* @cur: the document
|
||||
* @format: should formatting spaces been added
|
||||
*
|
||||
* Dump an XML document to an open FILE.
|
||||
*
|
||||
* returns: the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
xmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
xmlDocFormatDump(FILE *f, xmlDocPtr cur, int format) {
|
||||
xmlOutputBufferPtr buf;
|
||||
const char * encoding;
|
||||
xmlCharEncodingHandlerPtr handler = NULL;
|
||||
@ -7030,12 +7031,26 @@ xmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
}
|
||||
buf = xmlOutputBufferCreateFile(f, handler);
|
||||
if (buf == NULL) return(-1);
|
||||
xmlDocContentDumpOutput(buf, cur, NULL, 0);
|
||||
xmlDocContentDumpOutput(buf, cur, NULL, format);
|
||||
|
||||
ret = xmlOutputBufferClose(buf);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlDocDump:
|
||||
* @f: the FILE*
|
||||
* @cur: the document
|
||||
*
|
||||
* Dump an XML document to an open FILE.
|
||||
*
|
||||
* returns: the number of bytes written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
xmlDocDump(FILE *f, xmlDocPtr cur) {
|
||||
return(xmlDocFormatDump (f, cur, 0));
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSaveFileTo:
|
||||
* @buf: an output I/O buffer
|
||||
|
Reference in New Issue
Block a user