http://swpat.ffii.org/
Action against software patents
http://www.gnome.org/
Gnome2 Logo
http://www.w3.org/Status
W3C Logo
http://www.redhat.com/
Red Hat Logo
http://xmlsoft.org/
Made with Libxml2 Logo
Module xmlsave from libxml2
API Menu
../index.html
Main Menu
../docs.html
Developer Menu
../examples/index.html
Code Examples
index.html
API Menu
libxml-parser.html
Parser API
libxml-tree.html
Tree API
libxml-xmlreader.html
Reader API
../guidelines.html
XML Guidelines
../ChangeLog.html
ChangeLog
API Indexes
../APIchunk0.html
Alphabetic
../APIconstructors.html
Constructors
../APIfunctions.html
Functions/Types
../APIfiles.html
Modules
../APIsymbols.html
Symbols
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/libxml2
Solaris binaries
http://www.explain.com.au/oss/libxml2xslt.html
MacOsX binaries
http://libxmlplusplus.sourceforge.net/
C++ bindings
http://www.zend.com/php5/articles/php5-xmlphp.php#Heading4
PHP 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=libxml2
Bug Tracker
libxml-xmlregexp.html
Prev
libxml-xmlregexp.html
xmlregexp
index.html
Up
index.html
API documentation
../index.html
Home
../index.html
The XML C parser and toolkit of Gnome
libxml-xmlschemas.html
xmlschemas
libxml-xmlschemas.html
Next
API to save document or subtree of document
Table of Contents
Structure
#xmlSaveCtxt
xmlSaveCtxt
struct _xmlSaveCtxt
The content of this structure is not made public by the API.
Typedef
libxml-xmlsave.html#xmlSaveCtxt
xmlSaveCtxt
*
xmlSaveCtxtPtr
Enum
#xmlSaveOption
xmlSaveOption
int
#xmlSaveClose
xmlSaveClose
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt)
long
#xmlSaveDoc
xmlSaveDoc
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-tree.html#xmlDocPtr
xmlDocPtr
doc)
int
#xmlSaveFlush
xmlSaveFlush
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt)
int
#xmlSaveSetAttrEscape
xmlSaveSetAttrEscape
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-encoding.html#xmlCharEncodingOutputFunc
xmlCharEncodingOutputFunc
escape)
int
#xmlSaveSetEscape
xmlSaveSetEscape
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-encoding.html#xmlCharEncodingOutputFunc
xmlCharEncodingOutputFunc
escape)
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
#xmlSaveToFd
xmlSaveToFd
(int fd,
const char * encoding,
int options)
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
#xmlSaveToFilename
xmlSaveToFilename
(const char * filename,
const char * encoding,
int options)
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
#xmlSaveToIO
xmlSaveToIO
(
libxml-xmlIO.html#xmlOutputWriteCallback
xmlOutputWriteCallback
iowrite,
libxml-xmlIO.html#xmlOutputCloseCallback
xmlOutputCloseCallback
ioclose,
void * ioctx,
const char * encoding,
int options)
long
#xmlSaveTree
xmlSaveTree
(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-tree.html#xmlNodePtr
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
}
Function: xmlSaveClose
int	xmlSaveClose			(
libxml-xmlsave.html#xmlSaveCtxtPtr
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			(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-tree.html#xmlDocPtr
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			(
libxml-xmlsave.html#xmlSaveCtxtPtr
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		(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-encoding.html#xmlCharEncodingOutputFunc
xmlCharEncodingOutputFunc
escape)
Set a custom escaping function to be used for text in
libxml-SAX.html#attribute
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		(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-encoding.html#xmlCharEncodingOutputFunc
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: xmlSaveToFd
libxml-xmlsave.html#xmlSaveCtxtPtr
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
libxml-xmlsave.html#xmlSaveCtxtPtr
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
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
xmlSaveToIO		(
libxml-xmlIO.html#xmlOutputWriteCallback
xmlOutputWriteCallback
iowrite,
libxml-xmlIO.html#xmlOutputCloseCallback
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			(
libxml-xmlsave.html#xmlSaveCtxtPtr
xmlSaveCtxtPtr
ctxt,
libxml-tree.html#xmlNodePtr
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
:
a document
Returns
:
the number of byte written or -1 in case of error
../bugs.html
Daniel Veillard
