[964] | 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 | } xmlSaveOption; |
---|
| 32 | |
---|
| 33 | |
---|
| 34 | typedef struct _xmlSaveCtxt xmlSaveCtxt; |
---|
| 35 | typedef xmlSaveCtxt *xmlSaveCtxtPtr; |
---|
| 36 | |
---|
| 37 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL |
---|
| 38 | xmlSaveToFd (int fd, |
---|
| 39 | const char *encoding, |
---|
| 40 | int options); |
---|
| 41 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL |
---|
| 42 | xmlSaveToFilename (const char *filename, |
---|
| 43 | const char *encoding, |
---|
| 44 | int options); |
---|
| 45 | /****** |
---|
| 46 | Not yet implemented. |
---|
| 47 | |
---|
| 48 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL |
---|
| 49 | xmlSaveToBuffer (xmlBufferPtr buffer, |
---|
| 50 | const char *encoding, |
---|
| 51 | int options); |
---|
| 52 | ******/ |
---|
| 53 | XMLPUBFUN xmlSaveCtxtPtr XMLCALL |
---|
| 54 | xmlSaveToIO (xmlOutputWriteCallback iowrite, |
---|
| 55 | xmlOutputCloseCallback ioclose, |
---|
| 56 | void *ioctx, |
---|
| 57 | const char *encoding, |
---|
| 58 | int options); |
---|
| 59 | |
---|
| 60 | XMLPUBFUN long XMLCALL |
---|
| 61 | xmlSaveDoc (xmlSaveCtxtPtr ctxt, |
---|
| 62 | xmlDocPtr doc); |
---|
| 63 | XMLPUBFUN long XMLCALL |
---|
| 64 | xmlSaveTree (xmlSaveCtxtPtr ctxt, |
---|
| 65 | xmlNodePtr node); |
---|
| 66 | |
---|
| 67 | XMLPUBFUN intptr_t XMLCALL |
---|
| 68 | xmlSaveFlush (xmlSaveCtxtPtr ctxt); |
---|
| 69 | XMLPUBFUN intptr_t XMLCALL |
---|
| 70 | xmlSaveClose (xmlSaveCtxtPtr ctxt); |
---|
| 71 | XMLPUBFUN int XMLCALL |
---|
| 72 | xmlSaveSetEscape (xmlSaveCtxtPtr ctxt, |
---|
| 73 | xmlCharEncodingOutputFunc escape); |
---|
| 74 | XMLPUBFUN int XMLCALL |
---|
| 75 | xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt, |
---|
| 76 | xmlCharEncodingOutputFunc escape); |
---|
| 77 | #ifdef __cplusplus |
---|
| 78 | } |
---|
| 79 | #endif |
---|
| 80 | #endif /* LIBXML_OUTPUT_ENABLED */ |
---|
| 81 | #endif /* __XML_XMLSAVE_H__ */ |
---|
| 82 | |
---|
| 83 | |
---|