http://swpat.ffii.org/Action against software patents http://www.gnome.org/Gnome2 Logo http://www.w3.org/StatusW3C Logo http://www.redhat.com/Red Hat Logo http://xmlsoft.org/Made with Libxml2 Logo 
Module xmlsave from libxml2
API Menu ../index.htmlMain Menu ../docs.htmlDeveloper Menu ../examples/index.htmlCode Examples index.htmlAPI Menu libxml-parser.htmlParser API libxml-tree.htmlTree API libxml-xmlreader.htmlReader API ../guidelines.htmlXML Guidelines ../ChangeLog.htmlChangeLog API Indexes ../APIchunk0.htmlAlphabetic ../APIconstructors.htmlConstructors ../APIfunctions.htmlFunctions/Types ../APIfiles.htmlModules ../APIsymbols.htmlSymbols Related links http://mail.gnome.org/archives/xml/Mail archive http://xmlsoft.org/XSLT/XSLT libxslt http://phd.cs.unibo.it/gdome2/DOM gdome2 http://www.aleksey.com/xmlsec/XML-DSig xmlsec ftp://xmlsoft.org/FTP http://www.zlatkovic.com/projects/libxml/Windows binaries http://www.blastwave.org/packages.php/libxml2Solaris binaries http://www.explain.com.au/oss/libxml2xslt.htmlMacOsX binaries http://libxmlplusplus.sourceforge.net/C++ bindings http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4PHP bindings http://sourceforge.net/projects/libxml2-pas/Pascal bindings http://rubyforge.org/projects/xml-tools/Ruby bindings http://tclxml.sourceforge.net/Tcl bindings http://bugzilla.gnome.org/buglist.cgi?product=libxml2Bug Tracker libxml-xmlregexp.htmlPrev libxml-xmlregexp.htmlxmlregexp index.htmlUp index.htmlAPI documentation ../index.htmlHome ../index.htmlThe XML C parser and toolkit of Gnome libxml-xmlschemas.htmlxmlschemas libxml-xmlschemas.htmlNext API to save document or subtree of document 
Table of Contents
Structure #xmlSaveCtxtxmlSaveCtxt struct _xmlSaveCtxt
The content of this structure is not made public by the API.
Typedef libxml-xmlsave.html#xmlSaveCtxtxmlSaveCtxt  * xmlSaveCtxtPtr Enum #xmlSaveOptionxmlSaveOption int	#xmlSaveClosexmlSaveClose 			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt)long	#xmlSaveDocxmlSaveDoc 			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-tree.html#xmlDocPtrxmlDocPtr  doc)int	#xmlSaveFlushxmlSaveFlush 			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt)int	#xmlSaveSetAttrEscapexmlSaveSetAttrEscape 		( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-encoding.html#xmlCharEncodingOutputFuncxmlCharEncodingOutputFunc  escape)int	#xmlSaveSetEscapexmlSaveSetEscape 		( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-encoding.html#xmlCharEncodingOutputFuncxmlCharEncodingOutputFunc  escape) libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	#xmlSaveToBufferxmlSaveToBuffer 		( libxml-tree.html#xmlBufferPtrxmlBufferPtr  buffer, 					 const char * encoding, 					 int options) libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	#xmlSaveToFdxmlSaveToFd 		(int fd, 					 const char * encoding, 					 int options) libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	#xmlSaveToFilenamexmlSaveToFilename 	(const char * filename, 					 const char * encoding, 					 int options) libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	#xmlSaveToIOxmlSaveToIO 		( libxml-xmlIO.html#xmlOutputWriteCallbackxmlOutputWriteCallback  iowrite, 					 libxml-xmlIO.html#xmlOutputCloseCallbackxmlOutputCloseCallback  ioclose, 					 void * ioctx, 					 const char * encoding, 					 int options)long	#xmlSaveTreexmlSaveTree 			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-tree.html#xmlNodePtrxmlNodePtr  node)Description
Structure xmlSaveCtxt 
Structure xmlSaveCtxtstruct _xmlSaveCtxt {
The content of this structure is not made public by the API.
}
Enum xmlSaveOption 
Enum xmlSaveOption {
    
XML_SAVE_FORMAT  = 1 : format save output
    
XML_SAVE_NO_DECL  = 2 : drop the xml declaration
    
XML_SAVE_NO_EMPTY  = 4 : no empty tags
    
XML_SAVE_NO_XHTML  = 8 : disable XHTML1 specific rules
}
Function: xmlSaveClose
int	xmlSaveClose			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt)Close a document saving context, i.e. make sure that all bytes have been output and free the associated data.
ctxt: a document saving context Returns: the number of byte written or -1 in case of error. Function: xmlSaveDoc
long	xmlSaveDoc			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-tree.html#xmlDocPtrxmlDocPtr  doc)Save a full document to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead
ctxt: a document saving context doc: a document Returns: the number of byte written or -1 in case of error Function: xmlSaveFlush
int	xmlSaveFlush			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt)Flush a document saving context, i.e. make sure that all bytes have been output.
ctxt: a document saving context Returns: the number of byte written or -1 in case of error. Function: xmlSaveSetAttrEscape
int	xmlSaveSetAttrEscape		( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-encoding.html#xmlCharEncodingOutputFuncxmlCharEncodingOutputFunc  escape)Set a custom escaping function to be used for text in libxml-SAX.html#attributeattribute  content
ctxt: a document saving context escape: the escaping function Returns: 0 if successful or -1 in case of error. Function: xmlSaveSetEscape
int	xmlSaveSetEscape		( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-encoding.html#xmlCharEncodingOutputFuncxmlCharEncodingOutputFunc  escape)Set a custom escaping function to be used for text in element content
ctxt: a document saving context escape: the escaping function Returns: 0 if successful or -1 in case of error. Function: xmlSaveToBuffer
libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	xmlSaveToBuffer		( libxml-tree.html#xmlBufferPtrxmlBufferPtr  buffer, 					 const char * encoding, 					 int options)Create a document saving context serializing to a buffer with the encoding and the options given
buffer: a buffer encoding: the encoding name to use or NULL options: a set of xmlSaveOptions Returns: a new serialization context or NULL in case of error. Function: xmlSaveToFd
libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	xmlSaveToFd		(int fd, 					 const char * encoding, 					 int options)Create a document saving context serializing to a file descriptor with the encoding and the options given.
fd: a file descriptor number encoding: the encoding name to use or NULL options: a set of xmlSaveOptions Returns: a new serialization context or NULL in case of error. Function: xmlSaveToFilename
libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	xmlSaveToFilename	(const char * filename, 					 const char * encoding, 					 int options)Create a document saving context serializing to a filename or possibly to an URL (but this is less reliable) with the encoding and the options given.
filename: a file name or an URL encoding: the encoding name to use or NULL options: a set of xmlSaveOptions Returns: a new serialization context or NULL in case of error. Function: xmlSaveToIO
libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr 	xmlSaveToIO		( libxml-xmlIO.html#xmlOutputWriteCallbackxmlOutputWriteCallback  iowrite, 					 libxml-xmlIO.html#xmlOutputCloseCallbackxmlOutputCloseCallback  ioclose, 					 void * ioctx, 					 const char * encoding, 					 int options)Create a document saving context serializing to a file descriptor with the encoding and the options given
iowrite: an I/O write function ioclose: an I/O close function ioctx: an I/O handler encoding: the encoding name to use or NULL options: a set of xmlSaveOptions Returns: a new serialization context or NULL in case of error. Function: xmlSaveTree
long	xmlSaveTree			( libxml-xmlsave.html#xmlSaveCtxtPtrxmlSaveCtxtPtr  ctxt, 					 libxml-tree.html#xmlNodePtrxmlNodePtr  node)Save a subtree starting at the node parameter to a saving context TODO: The function is not fully implemented yet as it does not return the byte count but 0 instead
ctxt: a document saving context node: a document Returns: the number of byte written or -1 in case of error ../bugs.htmlDaniel Veillard 
