/usr/share/gtk-doc/html/libxml2
NameSizeModeActions
general.html54690644editdlrm
home.png6540644editdlrm
index.html43210644editdlrm
left.png4590644editdlrm
libxml2-c14n.html135460644editdlrm
libxml2-catalog.html365490644editdlrm
libxml2-chvalid.html198350644editdlrm
libxml2-debugXML.html333170644editdlrm
libxml2-dict.html135640644editdlrm
libxml2-DOCBparser.html173610644editdlrm
libxml2-encoding.html295150644editdlrm
libxml2-entities.html231260644editdlrm
libxml2-globals.html356420644editdlrm
libxml2-hash.html420570644editdlrm
libxml2-HTMLparser.html581190644editdlrm
libxml2-HTMLtree.html244160644editdlrm
libxml2-list.html255700644editdlrm
libxml2-nanoftp.html224030644editdlrm
libxml2-nanohttp.html166140644editdlrm
libxml2-parser.html1374940644editdlrm
libxml2-parserInternals.html1253570644editdlrm
libxml2-pattern.html193620644editdlrm
libxml2-relaxng.html352300644editdlrm
libxml2-SAX.html388750644editdlrm
libxml2-SAX2.html396590644editdlrm
libxml2-schemasInternals.html651200644editdlrm
libxml2-schematron.html171050644editdlrm
libxml2-threads.html128960644editdlrm
libxml2-tree.html2346010644editdlrm
libxml2-uri.html184340644editdlrm
libxml2-valid.html985040644editdlrm
libxml2-xinclude.html159200644editdlrm
libxml2-xlink.html173290644editdlrm
libxml2-xmlautomata.html351790644editdlrm
libxml2-xmlerror.html847150644editdlrm
libxml2-xmlexports.html35850644editdlrm
libxml2-xmlIO.html574960644editdlrm
libxml2-xmlmemory.html240210644editdlrm
libxml2-xmlmodule.html73700644editdlrm
libxml2-xmlreader.html1080980644editdlrm
libxml2-xmlregexp.html420120644editdlrm
libxml2-xmlsave.html148420644editdlrm
libxml2-xmlschemas.html425210644editdlrm
libxml2-xmlschemastypes.html444510644editdlrm
libxml2-xmlstring.html349710644editdlrm
libxml2-xmlunicode.html1065960644editdlrm
libxml2-xmlversion.html190260644editdlrm
libxml2-xmlwriter.html1120770644editdlrm
libxml2-xpath.html622590644editdlrm
libxml2-xpathInternals.html1449370644editdlrm
libxml2-xpointer.html255600644editdlrm
libxml2.devhelp3432830644editdlrm
right.png4720644editdlrm
style.css8200644editdlrm
up.png4060644editdlrm
Edit: /usr/share/gtk-doc/html/libxml2/libxml2-xmlsave.html (14842B)
xmlsave: the XML document serializer

xmlsave

xmlsave - the XML document serializer

API to save document or subtree of document

Author(s): Daniel Veillard

Synopsis

typedef enum xmlSaveOption;
typedef struct _xmlSaveCtxt xmlSaveCtxt;
typedef xmlSaveCtxt * xmlSaveCtxtPtr;
xmlSaveCtxtPtr	xmlSaveToIO		(xmlOutputWriteCallback iowrite, 
xmlOutputCloseCallback ioclose,
void * ioctx,
const char * encoding,
int options); xmlSaveCtxtPtr xmlSaveToFd (int fd,
const char * encoding,
int options); int xmlSaveClose (xmlSaveCtxtPtr ctxt); int xmlSaveSetAttrEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); xmlSaveCtxtPtr xmlSaveToBuffer (xmlBufferPtr buffer,
const char * encoding,
int options); xmlSaveCtxtPtr xmlSaveToFilename (const char * filename,
const char * encoding,
int options); int xmlSaveFlush (xmlSaveCtxtPtr ctxt); long xmlSaveDoc (xmlSaveCtxtPtr ctxt,
xmlDocPtr doc); int xmlSaveSetEscape (xmlSaveCtxtPtr ctxt,
xmlCharEncodingOutputFunc escape); long xmlSaveTree (xmlSaveCtxtPtr ctxt,
xmlNodePtr node);

Description

Details

Structure xmlSaveCtxt

struct _xmlSaveCtxt {
The content of this structure is not made public by the API.
} xmlSaveCtxt;


Typedef xmlSaveCtxtPtr

xmlSaveCtxt * xmlSaveCtxtPtr;


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 */
};


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.

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

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.

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.

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.

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.

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.

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.

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.

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