|
libxml2
|
XML/HTML serializer. More...
Typedefs | |
| typedef struct _xmlSaveCtxt | xmlSaveCtxt |
| XML and HTML serializer. | |
Enumerations | |
| enum | xmlSaveOption |
| This is the set of XML save options that can be passed down to the xmlSaveToFd and similar calls. More... | |
Functions | |
| xmlSaveCtxt * | 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. | |
| xmlSaveCtxt * | xmlSaveToFilename (const char *filename, const char *encoding, int options) |
| Create a document saving context serializing to a filename with the encoding and the options given. | |
| xmlSaveCtxt * | xmlSaveToBuffer (xmlBuffer *buffer, const char *encoding, int options) |
| Create a document saving context serializing to a buffer with the encoding and the options given. | |
| xmlSaveCtxt * | 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. | |
| long | xmlSaveDoc (xmlSaveCtxt *ctxt, xmlDoc *doc) |
| Serialize a document. | |
| long | xmlSaveTree (xmlSaveCtxt *ctxt, xmlNode *node) |
| Serialize a subtree starting. | |
| int | xmlSaveFlush (xmlSaveCtxt *ctxt) |
| Flush a document saving context, i.e. | |
| int | xmlSaveClose (xmlSaveCtxt *ctxt) |
| Close a document saving context, i.e. | |
| xmlParserErrors | xmlSaveFinish (xmlSaveCtxt *ctxt) |
| Close a document saving context, i.e. | |
| int | xmlSaveSetIndentString (xmlSaveCtxt *ctxt, const char *indent) |
| Sets the indent string. | |
| int | xmlSaveSetEscape (xmlSaveCtxt *ctxt, xmlCharEncodingOutputFunc escape) |
| Set a custom escaping function to be used for text in element content. | |
| int | xmlSaveSetAttrEscape (xmlSaveCtxt *ctxt, xmlCharEncodingOutputFunc escape) |
| Has no effect. | |
| int | xmlThrDefIndentTreeOutput (int v) |
| Set per-thread default value. | |
| const char * | xmlThrDefTreeIndentString (const char *v) |
| Set per-thread default value. | |
| int | xmlThrDefSaveNoEmptyTags (int v) |
| Set per-thread default value. | |
XML/HTML serializer.
API to save documents or subtrees of documents.
| enum xmlSaveOption |
This is the set of XML save options that can be passed down to the xmlSaveToFd and similar calls.
| int xmlSaveClose | ( | xmlSaveCtxt * | ctxt | ) |
Close a document saving context, i.e.
make sure that all buffered input has been processed and free the context struct.
| ctxt | a document saving context |
| long xmlSaveDoc | ( | xmlSaveCtxt * | ctxt, |
| xmlDoc * | doc ) |
Serialize a document.
If the save context has no encoding, uses the document's encoding. If the document has no encoding, uses ASCII without an encoding declaration.
| ctxt | a document saving context |
| doc | a document |
| xmlParserErrors xmlSaveFinish | ( | xmlSaveCtxt * | ctxt | ) |
Close a document saving context, i.e.
make sure that all buffered input has been processed and free the context struct.
| ctxt | a document saving context |
| int xmlSaveFlush | ( | xmlSaveCtxt * | ctxt | ) |
Flush a document saving context, i.e.
make sure that all buffered input has been processed.
| ctxt | a document saving context |
| int xmlSaveSetAttrEscape | ( | xmlSaveCtxt * | ctxt, |
| xmlCharEncodingOutputFunc | escape ) |
Has no effect.
| ctxt | a document saving context |
| escape | the escaping function |
| int xmlSaveSetEscape | ( | xmlSaveCtxt * | 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 |
| int xmlSaveSetIndentString | ( | xmlSaveCtxt * | ctxt, |
| const char * | indent ) |
Sets the indent string.
| ctxt | save context |
| indent | indent string |
| xmlSaveCtxt * xmlSaveToBuffer | ( | xmlBuffer * | buffer, |
| const char * | encoding, | ||
| int | options ) |
Create a document saving context serializing to a buffer with the encoding and the options given.
If encoding is NULL, xmlSaveDoc uses the document's encoding and xmlSaveTree uses UTF-8.
This function doesn't allow to distinguish unsupported encoding errors from failed memory allocations.
| buffer | a buffer |
| encoding | the encoding name to use or NULL |
| options | a set of xmlSaveOptions |
| xmlSaveCtxt * 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.
If encoding is NULL, xmlSaveDoc uses the document's encoding and xmlSaveTree uses UTF-8.
This function doesn't allow to distinguish unsupported encoding errors from failed memory allocations.
| fd | a file descriptor number |
| encoding | the encoding name to use (optional) |
| options | a set of xmlSaveOptions |
| xmlSaveCtxt * xmlSaveToFilename | ( | const char * | filename, |
| const char * | encoding, | ||
| int | options ) |
Create a document saving context serializing to a filename with the encoding and the options given.
If encoding is NULL, xmlSaveDoc uses the document's encoding and xmlSaveTree uses UTF-8.
This function doesn't allow to distinguish unsupported encoding errors from failed memory allocations.
| filename | a file name or an URL |
| encoding | the encoding name to use or NULL |
| options | a set of xmlSaveOptions |
| xmlSaveCtxt * 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.
If encoding is NULL, xmlSaveDoc uses the document's encoding and xmlSaveTree uses UTF-8.
This function doesn't allow to distinguish unsupported encoding errors from failed memory allocations.
| 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 |
| long xmlSaveTree | ( | xmlSaveCtxt * | ctxt, |
| xmlNode * | cur ) |
Serialize a subtree starting.
If the save context has no encoding, uses UTF-8.
| ctxt | a document saving context |
| cur | the root of the subtree to save |
| int xmlThrDefIndentTreeOutput | ( | int | v | ) |
Set per-thread default value.
| v | new value |
| int xmlThrDefSaveNoEmptyTags | ( | int | v | ) |
Set per-thread default value.
| v | new value |
| const char * xmlThrDefTreeIndentString | ( | const char * | v | ) |
Set per-thread default value.
| v | new value |