Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-tools / gnulib-lib / libxml / xmlsave.in.h
1 /*
2  * Summary: the XML document serializer
3  * Description: API to save document or subtree of document
4  *
5  * Copy: See Copyright for the status of this software.
6  *
7  * Author: Daniel Veillard
8  */
9
10 #ifndef __XML_XMLSAVE_H__
11 #define __XML_XMLSAVE_H__
12
13 #include <libxml/xmlversion.h>
14 #include <libxml/tree.h>
15 #include <libxml/encoding.h>
16 #include <libxml/xmlIO.h>
17
18 #ifdef LIBXML_OUTPUT_ENABLED
19 #ifdef __cplusplus
20 extern "C" {
21 #endif
22
23 /**
24  * xmlSaveOption:
25  *
26  * This is the set of XML save options that can be passed down
27  * to the xmlSaveToFd() and similar calls.
28  */
29 typedef enum {
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 } xmlSaveOption;
35
36
37 typedef struct _xmlSaveCtxt xmlSaveCtxt;
38 typedef xmlSaveCtxt *xmlSaveCtxtPtr;
39
40 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
41                 xmlSaveToFd             (int fd,
42                                          const char *encoding,
43                                          int options);
44 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
45                 xmlSaveToFilename       (const char *filename,
46                                          const char *encoding,
47                                          int options);
48
49 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
50                 xmlSaveToBuffer         (xmlBufferPtr buffer,
51                                          const char *encoding,
52                                          int options);
53
54 XMLPUBFUN xmlSaveCtxtPtr XMLCALL
55                 xmlSaveToIO             (xmlOutputWriteCallback iowrite,
56                                          xmlOutputCloseCallback ioclose,
57                                          void *ioctx,
58                                          const char *encoding,
59                                          int options);
60
61 XMLPUBFUN long XMLCALL
62                 xmlSaveDoc              (xmlSaveCtxtPtr ctxt,
63                                          xmlDocPtr doc);
64 XMLPUBFUN long XMLCALL
65                 xmlSaveTree             (xmlSaveCtxtPtr ctxt,
66                                          xmlNodePtr node);
67
68 XMLPUBFUN int XMLCALL
69                 xmlSaveFlush            (xmlSaveCtxtPtr ctxt);
70 XMLPUBFUN int XMLCALL
71                 xmlSaveClose            (xmlSaveCtxtPtr ctxt);
72 XMLPUBFUN int XMLCALL
73                 xmlSaveSetEscape        (xmlSaveCtxtPtr ctxt,
74                                          xmlCharEncodingOutputFunc escape);
75 XMLPUBFUN int XMLCALL
76                 xmlSaveSetAttrEscape    (xmlSaveCtxtPtr ctxt,
77                                          xmlCharEncodingOutputFunc escape);
78 #ifdef __cplusplus
79 }
80 #endif
81 #endif /* LIBXML_OUTPUT_ENABLED */
82 #endif /* __XML_XMLSAVE_H__ */
83
84