1
0
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:
Daniel Veillard
2002-06-10 15:59:44 +00:00
parent 9c45ba8f56
commit 9e4123023a
7 changed files with 113 additions and 33 deletions

21
tree.c
View File

@ -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