2 * Summary: the XML document serializer
3 * Description: API to save document or subtree of document
5 * Copy: See Copyright for the status of this software.
7 * Author: Daniel Veillard
10 #ifndef __XML_XMLSAVE_H__
11 #define __XML_XMLSAVE_H__
13 #include <libxml/xmlversion.h>
14 #include <libxml/tree.h>
15 #include <libxml/encoding.h>
16 #include <libxml/xmlIO.h>
18 #ifdef LIBXML_OUTPUT_ENABLED
26 * This is the set of XML save options that can be passed down
27 * to the xmlSaveToFd() and similar calls.
30 XML_SAVE_FORMAT = 1<<0, /* format save output */
31 XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */
32 XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */
33 XML_SAVE_NO_XHTML = 1<<3 /* disable XHTML1 specific rules */
37 typedef struct _xmlSaveCtxt xmlSaveCtxt;
38 typedef xmlSaveCtxt *xmlSaveCtxtPtr;
40 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
44 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
45 xmlSaveToFilename (const char *filename,
49 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
50 xmlSaveToBuffer (xmlBufferPtr buffer,
54 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
55 xmlSaveToIO (xmlOutputWriteCallback iowrite,
56 xmlOutputCloseCallback ioclose,
61 XMLPUBFUN long XMLCALL
62 xmlSaveDoc (xmlSaveCtxtPtr ctxt,
64 XMLPUBFUN long XMLCALL
65 xmlSaveTree (xmlSaveCtxtPtr ctxt,
69 xmlSaveFlush (xmlSaveCtxtPtr ctxt);
71 xmlSaveClose (xmlSaveCtxtPtr ctxt);
73 xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
74 xmlCharEncodingOutputFunc escape);
76 xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
77 xmlCharEncodingOutputFunc escape);
81 #endif /* LIBXML_OUTPUT_ENABLED */
82 #endif /* __XML_XMLSAVE_H__ */