Path: blob/master/venv/Lib/site-packages/lxml/includes/libxml/xmlsave.h
811 views
/*1* Summary: the XML document serializer2* Description: API to save document or subtree of document3*4* Copy: See Copyright for the status of this software.5*6* Author: Daniel Veillard7*/89#ifndef __XML_XMLSAVE_H__10#define __XML_XMLSAVE_H__1112#include <libxml/xmlversion.h>13#include <libxml/tree.h>14#include <libxml/encoding.h>15#include <libxml/xmlIO.h>1617#ifdef LIBXML_OUTPUT_ENABLED18#ifdef __cplusplus19extern "C" {20#endif2122/**23* xmlSaveOption:24*25* This is the set of XML save options that can be passed down26* to the xmlSaveToFd() and similar calls.27*/28typedef enum {29XML_SAVE_FORMAT = 1<<0, /* format save output */30XML_SAVE_NO_DECL = 1<<1, /* drop the xml declaration */31XML_SAVE_NO_EMPTY = 1<<2, /* no empty tags */32XML_SAVE_NO_XHTML = 1<<3, /* disable XHTML1 specific rules */33XML_SAVE_XHTML = 1<<4, /* force XHTML1 specific rules */34XML_SAVE_AS_XML = 1<<5, /* force XML serialization on HTML doc */35XML_SAVE_AS_HTML = 1<<6, /* force HTML serialization on XML doc */36XML_SAVE_WSNONSIG = 1<<7 /* format with non-significant whitespace */37} xmlSaveOption;383940typedef struct _xmlSaveCtxt xmlSaveCtxt;41typedef xmlSaveCtxt *xmlSaveCtxtPtr;4243XMLPUBFUN xmlSaveCtxtPtr XMLCALL44xmlSaveToFd (int fd,45const char *encoding,46int options);47XMLPUBFUN xmlSaveCtxtPtr XMLCALL48xmlSaveToFilename (const char *filename,49const char *encoding,50int options);5152XMLPUBFUN xmlSaveCtxtPtr XMLCALL53xmlSaveToBuffer (xmlBufferPtr buffer,54const char *encoding,55int options);5657XMLPUBFUN xmlSaveCtxtPtr XMLCALL58xmlSaveToIO (xmlOutputWriteCallback iowrite,59xmlOutputCloseCallback ioclose,60void *ioctx,61const char *encoding,62int options);6364XMLPUBFUN long XMLCALL65xmlSaveDoc (xmlSaveCtxtPtr ctxt,66xmlDocPtr doc);67XMLPUBFUN long XMLCALL68xmlSaveTree (xmlSaveCtxtPtr ctxt,69xmlNodePtr node);7071XMLPUBFUN int XMLCALL72xmlSaveFlush (xmlSaveCtxtPtr ctxt);73XMLPUBFUN int XMLCALL74xmlSaveClose (xmlSaveCtxtPtr ctxt);75XMLPUBFUN int XMLCALL76xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,77xmlCharEncodingOutputFunc escape);78XMLPUBFUN int XMLCALL79xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,80xmlCharEncodingOutputFunc escape);81#ifdef __cplusplus82}83#endif84#endif /* LIBXML_OUTPUT_ENABLED */85#endif /* __XML_XMLSAVE_H__ */8687888990