blob: d83038e3615ef4eaa8c0790a7881a3d49bb6f621 [file] [log] [blame]
Daniel Veillard1a8741c2004-03-04 13:40:59 +00001/*
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>
Daniel Veillard3995bc32004-05-15 18:57:31 +000015#include <libxml/encoding.h>
Daniel Veillard1a8741c2004-03-04 13:40:59 +000016#include <libxml/xmlIO.h>
17
Daniel Veillard2156d432004-03-04 15:59:36 +000018#ifdef LIBXML_OUTPUT_ENABLED
Daniel Veillard1a8741c2004-03-04 13:40:59 +000019#ifdef __cplusplus
20extern "C" {
21#endif
22
23typedef struct _xmlSaveCtxt xmlSaveCtxt;
24typedef xmlSaveCtxt *xmlSaveCtxtPtr;
25
26XMLPUBFUN xmlSaveCtxtPtr XMLCALL
27 xmlSaveToFd (int fd,
28 const char *encoding,
29 int options);
30XMLPUBFUN xmlSaveCtxtPtr XMLCALL
31 xmlSaveToFilename (const char *filename,
32 const char *encoding,
33 int options);
34XMLPUBFUN xmlSaveCtxtPtr XMLCALL
35 xmlSaveToBuffer (xmlBufferPtr buffer,
36 const char *encoding,
37 int options);
38XMLPUBFUN xmlSaveCtxtPtr XMLCALL
39 xmlSaveToIO (xmlOutputWriteCallback iowrite,
40 xmlOutputCloseCallback ioclose,
41 void *ioctx,
42 const char *encoding,
43 int options);
44
45XMLPUBFUN long XMLCALL
46 xmlSaveDoc (xmlSaveCtxtPtr ctxt,
47 xmlDocPtr doc);
48XMLPUBFUN long XMLCALL
49 xmlSaveTree (xmlSaveCtxtPtr ctxt,
50 xmlNodePtr node);
51
52XMLPUBFUN int XMLCALL
53 xmlSaveFlush (xmlSaveCtxtPtr ctxt);
54XMLPUBFUN int XMLCALL
55 xmlSaveClose (xmlSaveCtxtPtr ctxt);
Daniel Veillard3995bc32004-05-15 18:57:31 +000056XMLPUBFUN int XMLCALL
57 xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
58 xmlCharEncodingOutputFunc escape);
59XMLPUBFUN int XMLCALL
60 xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
61 xmlCharEncodingOutputFunc escape);
Daniel Veillard1a8741c2004-03-04 13:40:59 +000062#ifdef __cplusplus
63}
64#endif
Daniel Veillard2156d432004-03-04 15:59:36 +000065#endif /* LIBXML_OUTPUT_ENABLED */
Daniel Veillard1a8741c2004-03-04 13:40:59 +000066#endif /* __XML_XMLSAVE_H__ */
67
68