Index: tree.c =================================================================== RCS file: /cvs/gnome/gnome-xml/tree.c,v retrieving revision 1.128 diff -c -r1.128 tree.c *** tree.c 2001/04/25 12:59:04 1.128 --- tree.c 2001/04/26 18:51:33 *************** *** 6175,6191 **** } /** ! * xmlSaveFile: * @filename: the filename (or URL) * @cur: the document * * Dump an XML document to a file. Will use compression if * compiled in and enabled. If @filename is "-" the stdout file is ! * used. * returns: the number of byte written or -1 in case of failure. */ int ! xmlSaveFile(const char *filename, xmlDocPtr cur) { xmlOutputBufferPtr buf; const char *encoding; xmlCharEncodingHandlerPtr handler = NULL; --- 6175,6193 ---- } /** ! * xmlSaveFormatFile: * @filename: the filename (or URL) * @cur: the document + * @format: should formatting spaces been added * * Dump an XML document to a file. Will use compression if * compiled in and enabled. If @filename is "-" the stdout file is ! * used. If format is set then the document will be indented on output. ! * * returns: the number of byte written or -1 in case of failure. */ int ! xmlSaveFormatFile(const char *filename, xmlDocPtr cur, int format) { xmlOutputBufferPtr buf; const char *encoding; xmlCharEncodingHandlerPtr handler = NULL; *************** *** 6223,6231 **** buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); if (buf == NULL) return(-1); ! xmlDocContentDumpOutput(buf, cur, NULL, 0); ret = xmlOutputBufferClose(buf); return(ret); } --- 6225,6248 ---- buf = xmlOutputBufferCreateFilename(filename, handler, cur->compression); if (buf == NULL) return(-1); ! xmlDocContentDumpOutput(buf, cur, NULL, format); ret = xmlOutputBufferClose(buf); return(ret); + } + + /** + * xmlSaveFile: + * @filename: the filename (or URL) + * @cur: the document + * + * Dump an XML document to a file. Will use compression if + * compiled in and enabled. If @filename is "-" the stdout file is + * used. + * returns: the number of byte written or -1 in case of failure. + */ + int + xmlSaveFile(const char *filename, xmlDocPtr cur) { + return(xmlSaveFile(filename, cur, 0)); } Index: tree.h =================================================================== RCS file: /cvs/gnome/gnome-xml/tree.h,v retrieving revision 1.73 diff -c -r1.73 tree.h *** tree.h 2001/04/23 13:41:34 1.73 --- tree.h 2001/04/26 18:51:33 *************** *** 680,685 **** --- 680,688 ---- xmlNodePtr cur); int xmlSaveFile (const char *filename, xmlDocPtr cur); + int xmlSaveFormatFile (const char *filename, + xmlDocPtr cur, + int format); void xmlNodeDump (xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur,