mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-27 18:50:07 +03:00
- tree.[ch] xmlIO.h: applied patch from Joe McAlerney to add
xmlSaveFormatFileTo() Daniel
This commit is contained in:
parent
e39a93d0d3
commit
eefd44943c
@ -1,3 +1,8 @@
|
||||
Sat Apr 28 18:54:28 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* tree.[ch] xmlIO.h: applied patch from Joe McAlerney to add
|
||||
xmlSaveFormatFileTo()
|
||||
|
||||
Sat Apr 28 16:33:05 CEST 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
|
||||
|
||||
* xpath.c: simple and efficient optimization, XPath functions
|
||||
|
@ -689,11 +689,15 @@ void xmlNodeDump (xmlBufferPtr buf,
|
||||
int level,
|
||||
int format);
|
||||
|
||||
/* This one is exported from xmlIO.h
|
||||
/* These are exported from xmlIO.h
|
||||
|
||||
int xmlSaveFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
int xmlSaveFormatFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
*/
|
||||
|
||||
int xmlSaveFileEnc (const char *filename,
|
||||
|
@ -162,6 +162,10 @@ int xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
||||
int xmlSaveFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
int xmlSaveFormatFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
|
21
tree.c
21
tree.c
@ -6129,6 +6129,27 @@ xmlSaveFileTo(xmlOutputBuffer *buf, xmlDocPtr cur, const char *encoding) {
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSaveFormatFileTo:
|
||||
* @buf: an output I/O buffer
|
||||
* @cur: the document
|
||||
* @encoding: the encoding if any assuming the i/O layer handles the trancoding
|
||||
* @format: should formatting spaces been added
|
||||
*
|
||||
* Dump an XML document to an I/O buffer.
|
||||
*
|
||||
* returns: the number of byte written or -1 in case of failure.
|
||||
*/
|
||||
int
|
||||
xmlSaveFormatFileTo(xmlOutputBuffer *buf, xmlDocPtr cur, const char *encoding, int format) {
|
||||
int ret;
|
||||
|
||||
if (buf == NULL) return(0);
|
||||
xmlDocContentDumpOutput(buf, cur, encoding, format);
|
||||
ret = xmlOutputBufferClose(buf);
|
||||
return(ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlSaveFileEnc:
|
||||
* @filename: the filename (or URL)
|
||||
|
6
tree.h
6
tree.h
@ -689,11 +689,15 @@ void xmlNodeDump (xmlBufferPtr buf,
|
||||
int level,
|
||||
int format);
|
||||
|
||||
/* This one is exported from xmlIO.h
|
||||
/* These are exported from xmlIO.h
|
||||
|
||||
int xmlSaveFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
int xmlSaveFormatFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
*/
|
||||
|
||||
int xmlSaveFileEnc (const char *filename,
|
||||
|
4
xmlIO.h
4
xmlIO.h
@ -162,6 +162,10 @@ int xmlRegisterOutputCallbacks (xmlOutputMatchCallback matchFunc,
|
||||
int xmlSaveFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding);
|
||||
int xmlSaveFormatFileTo (xmlOutputBuffer *buf,
|
||||
xmlDocPtr cur,
|
||||
const char *encoding,
|
||||
int format);
|
||||
void xmlNodeDumpOutput (xmlOutputBufferPtr buf,
|
||||
xmlDocPtr doc,
|
||||
xmlNodePtr cur,
|
||||
|
Loading…
x
Reference in New Issue
Block a user