/usr/share/doc/libxml2-devel/html
NameSizeModeActions
book1.html96340644editdlrm
home.png6540644editdlrm
index.html96340644editdlrm
left.png4590644editdlrm
libxml-c14n.html180530644editdlrm
libxml-catalog.html410180644editdlrm
libxml-chvalid.html184210644editdlrm
libxml-debugXML.html379100644editdlrm
libxml-dict.html179440644editdlrm
libxml-DOCBparser.html206230644editdlrm
libxml-encoding.html347040644editdlrm
libxml-entities.html276870644editdlrm
libxml-globals.html330860644editdlrm
libxml-hash.html465390644editdlrm
libxml-HTMLparser.html599840644editdlrm
libxml-HTMLtree.html285990644editdlrm
libxml-lib.html96340644editdlrm
libxml-list.html301070644editdlrm
libxml-nanoftp.html270850644editdlrm
libxml-nanohttp.html212220644editdlrm
libxml-parser.html1463390644editdlrm
libxml-parserInternals.html1226640644editdlrm
libxml-pattern.html236710644editdlrm
libxml-relaxng.html410000644editdlrm
libxml-SAX.html434800644editdlrm
libxml-SAX2.html444490644editdlrm
libxml-schemasInternals.html640570644editdlrm
libxml-schematron.html217270644editdlrm
libxml-threads.html171590644editdlrm
libxml-tree.html2354420644editdlrm
libxml-uri.html226760644editdlrm
libxml-valid.html1024570644editdlrm
libxml-xinclude.html197040644editdlrm
libxml-xlink.html216440644editdlrm
libxml-xmlautomata.html395640644editdlrm
libxml-xmlerror.html1097000644editdlrm
libxml-xmlexports.html75890644editdlrm
libxml-xmlIO.html633120644editdlrm
libxml-xmlmemory.html292250644editdlrm
libxml-xmlmodule.html117090644editdlrm
libxml-xmlreader.html1141360644editdlrm
libxml-xmlregexp.html457830644editdlrm
libxml-xmlsave.html192850644editdlrm
libxml-xmlschemas.html477700644editdlrm
libxml-xmlschemastypes.html493740644editdlrm
libxml-xmlstring.html391560644editdlrm
libxml-xmlunicode.html1128500644editdlrm
libxml-xmlversion.html205630644editdlrm
libxml-xmlwriter.html1174770644editdlrm
libxml-xpath.html650230644editdlrm
libxml-xpathInternals.html1431260644editdlrm
libxml-xpointer.html299730644editdlrm
libxml-xzlib.html65330644editdlrm
right.png4720644editdlrm
up.png4060644editdlrm
Edit: /usr/share/doc/libxml2-devel/html/libxml-xmlsave.html (19285B)
Module xmlsave from libxml2
Action against software patentsGnome2 LogoW3C LogoRed Hat Logo
Made with Libxml2 Logo

Module xmlsave from libxml2

API Menu
API Indexes
Related links

API to save document or subtree of document

Table of Contents

Structure xmlSaveCtxt
struct _xmlSaveCtxt The content of this structure is not made public by the API.
Typedef xmlSaveCtxt * xmlSaveCtxtPtr
Enum xmlSaveOption
int	xmlSaveClose			(xmlSaveCtxtPtr ctxt)
long	xmlSaveDoc			(xmlSaveCtxtPtr ctxt, 
xmlDocPtr doc)
int	xmlSaveFlush			(xmlSaveCtxtPtr ctxt)
int	xmlSaveSetAttrEscape		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc escape)
int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc escape)
xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr buffer, 
const char * encoding,
int options)
xmlSaveCtxtPtr	xmlSaveToFd		(int fd, 
const char * encoding,
int options)
xmlSaveCtxtPtr	xmlSaveToFilename	(const char * filename, 
const char * encoding,
int options)
xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
const char * encoding,
int options)
long	xmlSaveTree			(xmlSaveCtxtPtr ctxt, 
xmlNodePtr node)

Description

Structure xmlSaveCtxt

Structure xmlSaveCtxt
struct _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
    XML_SAVE_XHTML = 16 : force XHTML1 specific rules
    XML_SAVE_AS_XML = 32 : force XML serialization on HTML doc
    XML_SAVE_AS_HTML = 64 : force HTML serialization on XML doc
    XML_SAVE_WSNONSIG = 128 : format with non-significant whitespace
}

Function: xmlSaveClose

int	xmlSaveClose			(xmlSaveCtxtPtr 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			(xmlSaveCtxtPtr ctxt, 
xmlDocPtr 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			(xmlSaveCtxtPtr 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		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc escape)

Set a custom escaping function to be used for text in attribute content

ctxt:a document saving context
escape:the escaping function
Returns:0 if successful or -1 in case of error.

Function: xmlSaveSetEscape

int	xmlSaveSetEscape		(xmlSaveCtxtPtr ctxt, 
xmlCharEncodingOutputFunc 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

xmlSaveCtxtPtr	xmlSaveToBuffer		(xmlBufferPtr 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

xmlSaveCtxtPtr	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

xmlSaveCtxtPtr	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

xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback 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			(xmlSaveCtxtPtr ctxt, 
xmlNodePtr 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:the top node of the subtree to save
Returns:the number of byte written or -1 in case of error

Daniel Veillard