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 */
34 XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */
35 XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */
36 XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */
37 XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */
41 typedef struct _xmlSaveCtxt xmlSaveCtxt;
42 typedef xmlSaveCtxt *xmlSaveCtxtPtr;
44 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
48 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
49 xmlSaveToFilename (const char *filename,
53 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
54 xmlSaveToBuffer (xmlBufferPtr buffer,
58 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
59 xmlSaveToIO (xmlOutputWriteCallback iowrite,
60 xmlOutputCloseCallback ioclose,
65 XMLPUBFUN long XMLCALL
66 xmlSaveDoc (xmlSaveCtxtPtr ctxt,
68 XMLPUBFUN long XMLCALL
69 xmlSaveTree (xmlSaveCtxtPtr ctxt,
73 xmlSaveFlush (xmlSaveCtxtPtr ctxt);
75 xmlSaveClose (xmlSaveCtxtPtr ctxt);
77 xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
78 xmlCharEncodingOutputFunc escape);
80 xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
81 xmlCharEncodingOutputFunc escape);
85 #endif /* LIBXML_OUTPUT_ENABLED */
86 #endif /* __XML_XMLSAVE_H__ */