Gnome XML Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# tree

## Name

tree --

## Synopsis

    void        xmlCheckVersion                 (int version);
    #define     LIBXML_VERSION_NUMBER
    #define     LIBXML_TEST_VERSION
    enum        xmlElementType;
    typedef     xmlChar;
    #define     CHAR
    #define     BAD_CAST
    struct      xmlNotation;
    typedef     xmlNotationPtr;
    enum        xmlAttributeType;
    enum        xmlAttributeDefault;
    struct      xmlEnumeration;
    typedef     xmlEnumerationPtr;
    struct      xmlAttribute;
    typedef     xmlAttributePtr;
    enum        xmlElementContentType;
    enum        xmlElementContentOccur;
    struct      xmlElementContent;
    typedef     xmlElementContentPtr;
    enum        xmlElementTypeVal;
    struct      xmlElement;
    typedef     xmlElementPtr;
    enum        xmlNsType;
    struct      xmlNs;
    typedef     xmlNsPtr;
    struct      xmlDtd;
    typedef     xmlDtdPtr;
    struct      xmlAttr;
    typedef     xmlAttrPtr;
    struct      xmlID;
    typedef     xmlIDPtr;
    struct      xmlRef;
    typedef     xmlRefPtr;
    enum        xmlBufferAllocationScheme;
    struct      xmlBuffer;
    typedef     xmlBufferPtr;
    struct      xmlNode;
    typedef     xmlNodePtr;
    struct      xmlDoc;
    typedef     xmlDocPtr;
    #define     xmlChildrenNode
    #define     xmlRootNode
    extern      xmlNsPtr baseDTD;
    extern      int oldXMLWDcompatibility;
    extern      int xmlIndentTreeOutput;
    extern      xmlBufferAllocationScheme xmlBufferAllocScheme;
    extern      int xmlSaveNoEmptyTags;
    xmlBufferPtr xmlBufferCreate                (void);
    xmlBufferPtr xmlBufferCreateSize            (size_t size);
    void        xmlBufferFree                   (xmlBufferPtr buf);
    int         xmlBufferDump                   (FILE *file,
                                                 xmlBufferPtr buf);
    void        xmlBufferAdd                    (xmlBufferPtr buf,
                                                 const xmlChar *str,
                                                 int len);
    void        xmlBufferCat                    (xmlBufferPtr buf,
                                                 const xmlChar *str);
    void        xmlBufferCCat                   (xmlBufferPtr buf,
                                                 const char *str);
    int         xmlBufferShrink                 (xmlBufferPtr buf,
                                                 int len);
    void        xmlBufferEmpty                  (xmlBufferPtr buf);
    const xmlChar* xmlBufferContent             (const xmlBufferPtr buf);
    int         xmlBufferUse                    (const xmlBufferPtr buf);
    void        xmlBufferSetAllocationScheme    (xmlBufferPtr buf,
                                                 xmlBufferAllocationScheme scheme);
    int         xmlBufferLength                 (const xmlBufferPtr buf);
    xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
    xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);
    void        xmlFreeDtd                      (xmlDtdPtr cur);
    xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);
    xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);
    void        xmlFreeNs                       (xmlNsPtr cur);
    xmlDocPtr   xmlNewDoc                       (const xmlChar *version);
    void        xmlFreeDoc                      (xmlDocPtr cur);
    xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    xmlAttrPtr  xmlNewNsProp                    (xmlNodePtr node,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    void        xmlFreePropList                 (xmlAttrPtr cur);
    void        xmlFreeProp                     (xmlAttrPtr cur);
    xmlAttrPtr  xmlCopyProp                     (xmlNodePtr target,
                                                 xmlAttrPtr cur);
    xmlAttrPtr  xmlCopyPropList                 (xmlNodePtr target,
                                                 xmlAttrPtr cur);
    xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);
    xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
                                                 int recursive);
    xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewDocRawNode                (xmlDocPtr doc,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
                                                 const xmlChar *name);
    xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewTextChild                 (xmlNodePtr parent,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewText                      (const xmlChar *content);
    xmlNodePtr  xmlNewPI                        (const xmlChar *name,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
                                                 const xmlChar *content,
                                                 int len);
    xmlNodePtr  xmlNewTextLen                   (const xmlChar *content,
                                                 int len);
    xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
                                                 const xmlChar *content);
    xmlNodePtr  xmlNewComment                   (const xmlChar *content);
    xmlNodePtr  xmlNewCDataBlock                (xmlDocPtr doc,
                                                 const xmlChar *content,
                                                 int len);
    xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
                                                 const xmlChar *name);
    xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
                                                 int recursive);
    xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);
    xmlNodePtr  xmlNewDocFragment               (xmlDocPtr doc);
    xmlNodePtr  xmlDocGetRootElement            (xmlDocPtr doc);
    xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);
    int         xmlNodeIsText                   (xmlNodePtr node);
    int         xmlIsBlankNode                  (xmlNodePtr node);
    xmlNodePtr  xmlDocSetRootElement            (xmlDocPtr doc,
                                                 xmlNodePtr root);
    void        xmlNodeSetName                  (xmlNodePtr cur,
                                                 const xmlChar *name);
    xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
                                                 xmlNodePtr cur);
    xmlNodePtr  xmlReplaceNode                  (xmlNodePtr old,
                                                 xmlNodePtr cur);
    xmlNodePtr  xmlAddSibling                   (xmlNodePtr cur,
                                                 xmlNodePtr elem);
    xmlNodePtr  xmlAddPrevSibling               (xmlNodePtr cur,
                                                 xmlNodePtr elem);
    xmlNodePtr  xmlAddNextSibling               (xmlNodePtr cur,
                                                 xmlNodePtr elem);
    void        xmlUnlinkNode                   (xmlNodePtr cur);
    xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
                                                 xmlNodePtr second);
    void        xmlTextConcat                   (xmlNodePtr node,
                                                 const xmlChar *content,
                                                 int len);
    void        xmlFreeNodeList                 (xmlNodePtr cur);
    void        xmlFreeNode                     (xmlNodePtr cur);
    xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
                                                 xmlNodePtr node,
                                                 const xmlChar *nameSpace);
    xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
                                                 xmlNodePtr node,
                                                 const xmlChar *href);
    xmlNsPtr*   xmlGetNsList                    (xmlDocPtr doc,
                                                 xmlNodePtr node);
    void        xmlSetNs                        (xmlNodePtr node,
                                                 xmlNsPtr ns);
    xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);
    xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);
    xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *value);
    xmlChar*    xmlGetProp                      (xmlNodePtr node,
                                                 const xmlChar *name);
    xmlChar*    xmlGetNsProp                    (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *nameSpace);
    xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
                                                 const xmlChar *value);
    xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 int len);
    xmlChar*    xmlNodeListGetString            (xmlDocPtr doc,
                                                 xmlNodePtr list,
                                                 int inLine);
    void        xmlNodeSetContent               (xmlNodePtr cur,
                                                 const xmlChar *content);
    void        xmlNodeSetContentLen            (xmlNodePtr cur,
                                                 const xmlChar *content,
                                                 int len);
    void        xmlNodeAddContent               (xmlNodePtr cur,
                                                 const xmlChar *content);
    void        xmlNodeAddContentLen            (xmlNodePtr cur,
                                                 const xmlChar *content,
                                                 int len);
    xmlChar*    xmlNodeGetContent               (xmlNodePtr cur);
    xmlChar*    xmlNodeGetLang                  (xmlNodePtr cur);
    void        xmlNodeSetLang                  (xmlNodePtr cur,
                                                 const xmlChar *lang);
    xmlChar*    xmlNodeGetBase                  (xmlDocPtr doc,
                                                 xmlNodePtr cur);
    int         xmlRemoveProp                   (xmlAttrPtr cur);
    int         xmlRemoveNode                   (xmlNodePtr node);
    void        xmlBufferWriteCHAR              (xmlBufferPtr buf,
                                                 const xmlChar *string);
    void        xmlBufferWriteChar              (xmlBufferPtr buf,
                                                 const char *string);
    void        xmlBufferWriteQuotedString      (xmlBufferPtr buf,
                                                 const xmlChar *string);
    void        xmlDocDumpMemory                (xmlDocPtr cur,
                                                 xmlChar **mem,
                                                 int *size);
    void        xmlDocDump                      (FILE *f,
                                                 xmlDocPtr cur);
    void        xmlElemDump                     (FILE *f,
                                                 xmlDocPtr cur,
                                                 xmlNodePtr elem);
    int         xmlSaveFile                     (const char *filename,
                                                 xmlDocPtr cur);
    int         xmlGetDocCompressMode           (xmlDocPtr doc);
    void        xmlSetDocCompressMode           (xmlDocPtr doc,
                                                 int mode);
    int         xmlGetCompressMode              (void);
    void        xmlSetCompressMode              (int mode);

## Description

## Details

### xmlCheckVersion ()

    void        xmlCheckVersion                 (int version);

`version` : |

### LIBXML_VERSION_NUMBER

    #define LIBXML_VERSION_NUMBER 10808

### LIBXML_TEST_VERSION

    #define LIBXML_TEST_VERSION xmlCheckVersion(LIBXML_VERSION_NUMBER);

### enum xmlElementType

    typedef enum {
        XML_ELEMENT_NODE=		1,
        XML_ATTRIBUTE_NODE=		2,
        XML_TEXT_NODE=		3,
        XML_CDATA_SECTION_NODE=	4,
        XML_ENTITY_REF_NODE=	5,
        XML_ENTITY_NODE=		6,
        XML_PI_NODE=		7,
        XML_COMMENT_NODE=		8,
        XML_DOCUMENT_NODE=		9,
        XML_DOCUMENT_TYPE_NODE=	10,
        XML_DOCUMENT_FRAG_NODE=	11,
        XML_NOTATION_NODE=		12,
        XML_HTML_DOCUMENT_NODE=	13
    } xmlElementType;

### xmlChar

### CHAR

    #define CHAR xmlChar

### BAD_CAST

    #define BAD_CAST (xmlChar *)

### struct xmlNotation

    struct xmlNotation {
        const xmlChar               *name;	/* Notation name */
        const xmlChar               *PublicID;	/* Public identifier, if any */
        const xmlChar               *SystemID;	/* System identifier, if any */
    };

### xmlNotationPtr

    typedef xmlNotation *xmlNotationPtr;

### enum xmlAttributeType

    typedef enum {
        XML_ATTRIBUTE_CDATA = 1,
        XML_ATTRIBUTE_ID,
        XML_ATTRIBUTE_IDREF	,
        XML_ATTRIBUTE_IDREFS,
        XML_ATTRIBUTE_ENTITY,
        XML_ATTRIBUTE_ENTITIES,
        XML_ATTRIBUTE_NMTOKEN,
        XML_ATTRIBUTE_NMTOKENS,
        XML_ATTRIBUTE_ENUMERATION,
        XML_ATTRIBUTE_NOTATION
    } xmlAttributeType;

### enum xmlAttributeDefault

    typedef enum {
        XML_ATTRIBUTE_NONE = 1,
        XML_ATTRIBUTE_REQUIRED,
        XML_ATTRIBUTE_IMPLIED,
        XML_ATTRIBUTE_FIXED
    } xmlAttributeDefault;

### struct xmlEnumeration

    struct xmlEnumeration {
        struct _xmlEnumeration    *next;	/* next one */
        const xmlChar            *name;	/* Enumeration name */
    };

### xmlEnumerationPtr

    typedef xmlEnumeration *xmlEnumerationPtr;

### struct xmlAttribute

    struct xmlAttribute {
        const xmlChar         *elem;	/* Element holding the attribute */
        const xmlChar         *name;	/* Attribute name */
        struct _xmlAttribute   *next;       /* list of attributes of an element */
        xmlAttributeType       type;	/* The type */
        xmlAttributeDefault    def;		/* the default */
        const xmlChar         *defaultValue;/* or the default value */
        xmlEnumerationPtr      tree;        /* or the enumeration tree if any */
        const xmlChar         *prefix;      /* the namespace prefix if any */
    };

### xmlAttributePtr

    typedef xmlAttribute *xmlAttributePtr;

### enum xmlElementContentType

    typedef enum {
        XML_ELEMENT_CONTENT_PCDATA = 1,
        XML_ELEMENT_CONTENT_ELEMENT,
        XML_ELEMENT_CONTENT_SEQ,
        XML_ELEMENT_CONTENT_OR
    } xmlElementContentType;

### enum xmlElementContentOccur

    typedef enum {
        XML_ELEMENT_CONTENT_ONCE = 1,
        XML_ELEMENT_CONTENT_OPT,
        XML_ELEMENT_CONTENT_MULT,
        XML_ELEMENT_CONTENT_PLUS
    } xmlElementContentOccur;

### struct xmlElementContent

    struct xmlElementContent {
        xmlElementContentType     type;	/* PCDATA, ELEMENT, SEQ or OR */
        xmlElementContentOccur    ocur;	/* ONCE, OPT, MULT or PLUS */
        const xmlChar            *name;	/* Element name */
        struct _xmlElementContent *c1;	/* first child */
        struct _xmlElementContent *c2;	/* second child */
    };

### xmlElementContentPtr

    typedef xmlElementContent *xmlElementContentPtr;

### enum xmlElementTypeVal

    typedef enum {
        XML_ELEMENT_TYPE_EMPTY = 1,
        XML_ELEMENT_TYPE_ANY,
        XML_ELEMENT_TYPE_MIXED,
        XML_ELEMENT_TYPE_ELEMENT
    } xmlElementTypeVal;

### struct xmlElement

    struct xmlElement {
        const xmlChar          *name;	/* Element name */
        xmlElementTypeVal       type;	/* The type */
        xmlElementContentPtr content;	/* the allowed element content */
        xmlAttributePtr   attributes;	/* List of the declared attributes */
    };

### xmlElementPtr

    typedef xmlElement *xmlElementPtr;

### enum xmlNsType

    typedef enum {
        XML_GLOBAL_NAMESPACE = 1,	/* old style global namespace */
        XML_LOCAL_NAMESPACE		/* new style local scoping */
    } xmlNsType;

### struct xmlNs

    struct xmlNs {
        struct _xmlNs  *next;	/* next Ns link for this node  */
        xmlNsType      type;	/* global or local */
        const xmlChar *href;	/* URL for the namespace */
        const xmlChar *prefix;	/* prefix for the namespace */
    };

### xmlNsPtr

    typedef xmlNs *xmlNsPtr;

### struct xmlDtd

    struct xmlDtd {
        const xmlChar *name;	/* Name of the DTD */
        const xmlChar *ExternalID;	/* External identifier for PUBLIC DTD */
        const xmlChar *SystemID;	/* URI for a SYSTEM or PUBLIC DTD */
        void          *notations;   /* Hash table for notations if any */
        void          *elements;    /* Hash table for elements if any */
        void          *attributes;  /* Hash table for attributes if any */
        void          *entities;    /* Hash table for entities if any */
        /* struct xmlDtd *next;	 * next  link for this document  */
    };

### xmlDtdPtr

    typedef xmlDtd *xmlDtdPtr;

### struct xmlAttr

    struct xmlAttr {
    #ifndef XML_WITHOUT_CORBA
        void           *_private;	/* for Corba, must be first ! */
        void           *vepv;	/* for Corba, must be next ! */
    #endif
        xmlElementType  type;       /* XML_ATTRIBUTE_NODE, must be third ! */
        struct _xmlNode *node;	/* attr->node link */
        struct _xmlAttr *next;	/* attribute list link */
        const xmlChar   *name;      /* the name of the property */
        struct _xmlNode *val;       /* the value of the property */
        xmlNs           *ns;        /* pointer to the associated namespace */
    };

### xmlAttrPtr

    typedef xmlAttr *xmlAttrPtr;

### struct xmlID

    struct xmlID {
        struct _xmlID    *next;	/* next ID */
        const xmlChar    *value;	/* The ID name */
        xmlAttrPtr        attr;	/* The attribut holding it */
    };

### xmlIDPtr

    typedef xmlID *xmlIDPtr;

### struct xmlRef

    struct xmlRef {
        struct _xmlRef    *next;	/* next Ref */
        const xmlChar     *value;	/* The Ref name */
        xmlAttrPtr        attr;	/* The attribut holding it */
    };

### xmlRefPtr

    typedef xmlRef *xmlRefPtr;

### enum xmlBufferAllocationScheme

    typedef enum {
        XML_BUFFER_ALLOC_DOUBLEIT,
        XML_BUFFER_ALLOC_EXACT
    } xmlBufferAllocationScheme;

Sets the allocation scheme for this buffer

### struct xmlBuffer

    struct xmlBuffer {
        xmlChar *content;		/* The buffer content UTF8 */
        unsigned int use;		/* The buffer size used */
        unsigned int size;		/* The buffer size */
        xmlBufferAllocationScheme alloc; /* The realloc method */
    };

### xmlBufferPtr

    typedef xmlBuffer *xmlBufferPtr;

### struct xmlNode

    struct xmlNode {
    #ifndef XML_WITHOUT_CORBA
        void           *_private;	/* for Corba, must be first ! */
        void           *vepv;	/* for Corba, must be next ! */
    #endif
        xmlElementType  type;	/* type number in the DTD, must be third ! */
        struct _xmlDoc  *doc;	/* the containing document */
        struct _xmlNode *parent;	/* child->parent link */
        struct _xmlNode *next;	/* next sibling link  */
        struct _xmlNode *prev;	/* previous sibling link  */
        struct _xmlNode *childs;	/* parent->childs link */
        struct _xmlNode *last;	/* last child link */
        struct _xmlAttr *properties;/* properties list */
        const xmlChar  *name;       /* the name of the node, or the entity */
        xmlNs          *ns;         /* pointer to the associated namespace */
        xmlNs          *nsDef;      /* namespace definitions on this node */
    #ifndef XML_USE_BUFFER_CONTENT
        xmlChar        *content;    /* the content */
    #else
        xmlBufferPtr   content;     /* the content in a buffer */
    #endif
    };

### xmlNodePtr

    typedef xmlNode *xmlNodePtr;

### struct xmlDoc

    struct xmlDoc {
    #ifndef XML_WITHOUT_CORBA
        void           *_private;	/* for Corba, must be first ! */
        void           *vepv;	/* for Corba, must be next ! */
    #endif
        xmlElementType  type;       /* XML_DOCUMENT_NODE, must be second ! */
        char           *name;	/* name/filename/URI of the document */
        const xmlChar  *version;	/* the XML version string */
        const xmlChar  *encoding;   /* encoding, if any */
        int             compression;/* level of zlib compression */
        int             standalone; /* standalone document (no external refs) */
        struct _xmlDtd  *intSubset;	/* the document internal subset */
        struct _xmlDtd  *extSubset;	/* the document external subset */
        struct _xmlNs   *oldNs;	/* Global namespace, the old way */
        struct _xmlNode *root;	/* the document tree */
        void           *ids;        /* Hash table for ID attributes if any */
        void           *refs;       /* Hash table for IDREFs attributes if any */
    };

### xmlDocPtr

    typedef xmlDoc *xmlDocPtr;

### xmlChildrenNode

    #define xmlChildrenNode childs

### xmlRootNode

    #define xmlRootNode root

### baseDTD

    extern xmlNsPtr baseDTD;

### oldXMLWDcompatibility

    extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */

### xmlIndentTreeOutput

    extern int xmlIndentTreeOutput;  /* try to indent the tree dumps */

### xmlBufferAllocScheme

    extern xmlBufferAllocationScheme xmlBufferAllocScheme; /* alloc scheme to use */

### xmlSaveNoEmptyTags

    extern int xmlSaveNoEmptyTags;   /* save empty tags as <empty></empty> */

### xmlBufferCreate ()

    xmlBufferPtr xmlBufferCreate                (void);

routine to create an XML buffer.

Returns : | the new structure.

### xmlBufferCreateSize ()

    xmlBufferPtr xmlBufferCreateSize            (size_t size);

routine to create an XML buffer.

`size` : | initial size of buffer
Returns : | the new structure.

### xmlBufferFree ()

    void        xmlBufferFree                   (xmlBufferPtr buf);

Frees an XML buffer.

`buf` : | the buffer to free

### xmlBufferDump ()

    int         xmlBufferDump                   (FILE *file,
                                                 xmlBufferPtr buf);

Dumps an XML buffer to a FILE *.

`file` : | the file output
`buf` : | the buffer to dump
Returns : | the number of xmlChar written

### xmlBufferAdd ()

    void        xmlBufferAdd                    (xmlBufferPtr buf,
                                                 const xmlChar *str,
                                                 int len);

Add a string range to an XML buffer. if len == -1, the lenght of str is recomputed.

`buf` : | the buffer to dump
`str` : | the xmlChar string
`len` : | the number of xmlChar to add

### xmlBufferCat ()

    void        xmlBufferCat                    (xmlBufferPtr buf,
                                                 const xmlChar *str);

Append a zero terminated string to an XML buffer.

`buf` : | the buffer to dump
`str` : | the xmlChar string

### xmlBufferCCat ()

    void        xmlBufferCCat                   (xmlBufferPtr buf,
                                                 const char *str);

Append a zero terminated C string to an XML buffer.

`buf` : | the buffer to dump
`str` : | the C char string

### xmlBufferShrink ()

    int         xmlBufferShrink                 (xmlBufferPtr buf,
                                                 int len);

Remove the beginning of an XML buffer.

`buf` : | the buffer to dump
`len` : | the number of xmlChar to remove
Returns : | the number of xmlChar removed, or -1 in case of failure.

### xmlBufferEmpty ()

    void        xmlBufferEmpty                  (xmlBufferPtr buf);

empty a buffer.

`buf` : | the buffer

### xmlBufferContent ()

    const xmlChar* xmlBufferContent             (const xmlBufferPtr buf);

`buf` : | the buffer to resize
Returns : | the internal content

### xmlBufferUse ()

    int         xmlBufferUse                    (const xmlBufferPtr buf);

`buf` : |
Returns : |

### xmlBufferSetAllocationScheme ()

    void        xmlBufferSetAllocationScheme    (xmlBufferPtr buf,
                                                 xmlBufferAllocationScheme scheme);

`buf` : |
`scheme` : |

### xmlBufferLength ()

    int         xmlBufferLength                 (const xmlBufferPtr buf);

`buf` : | the buffer
Returns : | the length of data in the internal content

### xmlCreateIntSubset ()

    xmlDtdPtr   xmlCreateIntSubset              (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);

Create the internal subset of a document

`doc` : | the document pointer
`name` : | the DTD name
`ExternalID` : | the external ID
`SystemID` : | the system ID
Returns : | a pointer to the new DTD structure

### xmlNewDtd ()

    xmlDtdPtr   xmlNewDtd                       (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *ExternalID,
                                                 const xmlChar *SystemID);

Creation of a new DTD.

`doc` : | the document pointer
`name` : | the DTD name
`ExternalID` : | the external ID
`SystemID` : | the system ID
Returns : | a pointer to the new DTD structure

### xmlFreeDtd ()

    void        xmlFreeDtd                      (xmlDtdPtr cur);

Free a DTD structure.

`cur` : | the DTD structure to free up

### xmlNewGlobalNs ()

    xmlNsPtr    xmlNewGlobalNs                  (xmlDocPtr doc,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);

Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!! It now create a namespace on the root element of the document if found.

`doc` : | the document carrying the namespace
`href` : | the URI associated
`prefix` : | the prefix for the namespace
Returns : | NULL this functionnality had been removed

### xmlNewNs ()

    xmlNsPtr    xmlNewNs                        (xmlNodePtr node,
                                                 const xmlChar *href,
                                                 const xmlChar *prefix);

Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node.

`node` : | the element carrying the namespace
`href` : | the URI associated
`prefix` : | the prefix for the namespace
Returns : | returns a new namespace pointer or NULL

### xmlFreeNs ()

    void        xmlFreeNs                       (xmlNsPtr cur);

Free up the structures associated to a namespace

`cur` : | the namespace pointer

### xmlNewDoc ()

    xmlDocPtr   xmlNewDoc                       (const xmlChar *version);

`version` : | xmlChar string giving the version of XML "1.0"
Returns : | a new document

### xmlFreeDoc ()

    void        xmlFreeDoc                      (xmlDocPtr cur);

Free up all the structures used by a document, tree included.

`cur` : | pointer to the document @:

### xmlNewDocProp ()

    xmlAttrPtr  xmlNewDocProp                   (xmlDocPtr doc,
                                                 const xmlChar *name,
                                                 const xmlChar *value);

Create a new property carried by a document.

`doc` : | the document
`name` : | the name of the attribute
`value` : | the value of the attribute
Returns : | a pointer to the attribute

### xmlNewProp ()

    xmlAttrPtr  xmlNewProp                      (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *value);

Create a new property carried by a node.

`node` : | the holding node
`name` : | the name of the attribute
`value` : | the value of the attribute
Returns : | a pointer to the attribute

### xmlNewNsProp ()

    xmlAttrPtr  xmlNewNsProp                    (xmlNodePtr node,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *value);

Create a new property tagged with a namespace and carried by a node.

`node` : | the holding node
`ns` : | the namespace
`name` : | the name of the attribute
`value` : | the value of the attribute
Returns : | a pointer to the attribute

### xmlFreePropList ()

    void        xmlFreePropList                 (xmlAttrPtr cur);

Free a property and all its siblings, all the childs are freed too.

`cur` : | the first property in the list

### xmlFreeProp ()

    void        xmlFreeProp                     (xmlAttrPtr cur);

Free one attribute, all the content is freed too

`cur` : | an attribute

### xmlCopyProp ()

    xmlAttrPtr  xmlCopyProp                     (xmlNodePtr target,
                                                 xmlAttrPtr cur);

Do a copy of the attribute.

`target` : | the element where the attribute will be grafted
`cur` : | the attribute
Returns : | a new xmlAttrPtr, or NULL in case of error.

### xmlCopyPropList ()

    xmlAttrPtr  xmlCopyPropList                 (xmlNodePtr target,
                                                 xmlAttrPtr cur);

Do a copy of an attribute list.

`target` : | the element where the attributes will be grafted
`cur` : | the first attribute
Returns : | a new xmlAttrPtr, or NULL in case of error.

### xmlCopyDtd ()

    xmlDtdPtr   xmlCopyDtd                      (xmlDtdPtr dtd);

Do a copy of the dtd.

`dtd` : | the dtd
Returns : | a new xmlDtdPtr, or NULL in case of error.

### xmlCopyDoc ()

    xmlDocPtr   xmlCopyDoc                      (xmlDocPtr doc,
                                                 int recursive);

Do a copy of the document info. If recursive, the content tree will be copied too as well as Dtd, namespaces and entities.

`doc` : | the document
`recursive` : | if 1 do a recursive copy.
Returns : | a new xmlDocPtr, or NULL in case of error.

### xmlNewDocNode ()

    xmlNodePtr  xmlNewDocNode                   (xmlDocPtr doc,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);

Creation of a new node element within a document. `ns` and `content` are optionnal (NULL). NOTE: `content` is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.

`doc` : | the document
`ns` : | namespace if any
`name` : | the node name
`content` : | the XML text content if any
Returns : | a pointer to the new node object.

### xmlNewDocRawNode ()

    xmlNodePtr  xmlNewDocRawNode                (xmlDocPtr doc,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);

Creation of a new node element within a document. `ns` and `content` are optionnal (NULL).

`doc` : | the document
`ns` : | namespace if any
`name` : | the node name
`content` : | the text content if any
Returns : | a pointer to the new node object.

### xmlNewNode ()

    xmlNodePtr  xmlNewNode                      (xmlNsPtr ns,
                                                 const xmlChar *name);

Creation of a new node element. `ns` and `content` are optionnal (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created.

`ns` : | namespace if any
`name` : | the node name
Returns : | a pointer to the new node object.

### xmlNewChild ()

    xmlNodePtr  xmlNewChild                     (xmlNodePtr parent,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);

Creation of a new child element, added at the end of `parent` childs list. `ns` and `content` parameters are optionnal (NULL). If content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: `content` is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewTextChild() if entities support is not needed.

`parent` : | the parent node
`ns` : | a namespace if any
`name` : | the name of the child
`content` : | the XML content of the child if any.
Returns : | a pointer to the new node object.

### xmlNewTextChild ()

    xmlNodePtr  xmlNewTextChild                 (xmlNodePtr parent,
                                                 xmlNsPtr ns,
                                                 const xmlChar *name,
                                                 const xmlChar *content);

Creation of a new child element, added at the end of `parent` childs list. `ns` and `content` parameters are optionnal (NULL). If content is non NULL, a child TEXT node will be created containing the string content.

`parent` : | the parent node
`ns` : | a namespace if any
`name` : | the name of the child
`content` : | the text content of the child if any.
Returns : | a pointer to the new node object.

### xmlNewDocText ()

    xmlNodePtr  xmlNewDocText                   (xmlDocPtr doc,
                                                 const xmlChar *content);

Creation of a new text node within a document.

`doc` : | the document
`content` : | the text content
Returns : | a pointer to the new node object.

### xmlNewText ()

    xmlNodePtr  xmlNewText                      (const xmlChar *content);

Creation of a new text node.

`content` : | the text content
Returns : | a pointer to the new node object.

### xmlNewPI ()

    xmlNodePtr  xmlNewPI                        (const xmlChar *name,
                                                 const xmlChar *content);

Creation of a processing instruction element.

`name` : | the processing instruction name
`content` : | the PI content
Returns : | a pointer to the new node object.

### xmlNewDocTextLen ()

    xmlNodePtr  xmlNewDocTextLen                (xmlDocPtr doc,
                                                 const xmlChar *content,
                                                 int len);

Creation of a new text node with an extra content lenght parameter. The text node pertain to a given document.

`doc` : | the document
`content` : | the text content
`len` : | the text len.
Returns : | a pointer to the new node object.

### xmlNewTextLen ()

    xmlNodePtr  xmlNewTextLen                   (const xmlChar *content,
                                                 int len);

Creation of a new text node with an extra parameter for the content's lenght

`content` : | the text content
`len` : | the text len.
Returns : | a pointer to the new node object.

### xmlNewDocComment ()

    xmlNodePtr  xmlNewDocComment                (xmlDocPtr doc,
                                                 const xmlChar *content);

Creation of a new node containing a commentwithin a document.

`doc` : | the document
`content` : | the comment content
Returns : | a pointer to the new node object.

### xmlNewComment ()

    xmlNodePtr  xmlNewComment                   (const xmlChar *content);

Creation of a new node containing a comment.

`content` : | the comment content
Returns : | a pointer to the new node object.

### xmlNewCDataBlock ()

    xmlNodePtr  xmlNewCDataBlock                (xmlDocPtr doc,
                                                 const xmlChar *content,
                                                 int len);

Creation of a new node containing a CData block.

`doc` : | the document
`content` : | the CData block content content
`len` : | the length of the block
Returns : | a pointer to the new node object.

### xmlNewReference ()

    xmlNodePtr  xmlNewReference                 (xmlDocPtr doc,
                                                 const xmlChar *name);

Creation of a new reference node.

`doc` : | the document
`name` : | the reference name, or the reference string with & and ;
Returns : | a pointer to the new node object.

### xmlCopyNode ()

    xmlNodePtr  xmlCopyNode                     (xmlNodePtr node,
                                                 int recursive);

Do a copy of the node.

`node` : | the node
`recursive` : | if 1 do a recursive copy.
Returns : | a new xmlNodePtr, or NULL in case of error.

### xmlCopyNodeList ()

    xmlNodePtr  xmlCopyNodeList                 (xmlNodePtr node);

Do a recursive copy of the node list.

`node` : | the first node in the list.
Returns : | a new xmlNodePtr, or NULL in case of error.

### xmlNewDocFragment ()

    xmlNodePtr  xmlNewDocFragment               (xmlDocPtr doc);

Creation of a new Fragment node.

`doc` : | the document owning the fragment
Returns : | a pointer to the new node object.

### xmlDocGetRootElement ()

    xmlNodePtr  xmlDocGetRootElement            (xmlDocPtr doc);

Get the root element of the document (doc->root is a list containing possibly comments, PIs, etc ...).

`doc` : | the document
Returns : | the xmlNodePtr for the root or NULL

### xmlGetLastChild ()

    xmlNodePtr  xmlGetLastChild                 (xmlNodePtr parent);

Search the last child of a node.

`parent` : | the parent node
Returns : | the last child or NULL if none.

### xmlNodeIsText ()

    int         xmlNodeIsText                   (xmlNodePtr node);

Is this node a Text node ?

`node` : | the node
Returns : | 1 yes, 0 no

### xmlIsBlankNode ()

    int         xmlIsBlankNode                  (xmlNodePtr node);

Is this node a Text node ?

`node` : | the node
Returns : | 1 yes, 0 no

### xmlDocSetRootElement ()

    xmlNodePtr  xmlDocSetRootElement            (xmlDocPtr doc,
                                                 xmlNodePtr root);

Set the root element of the document (doc->root is a list containing possibly comments, PIs, etc ...).

`doc` : | the document
`root` : | the new document root element
Returns : | the old root element if any was found

### xmlNodeSetName ()

    void        xmlNodeSetName                  (xmlNodePtr cur,
                                                 const xmlChar *name);

Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor.

`cur` : | the node being changed
`name` : | the new tag name

### xmlAddChild ()

    xmlNodePtr  xmlAddChild                     (xmlNodePtr parent,
                                                 xmlNodePtr cur);

Add a new child element, to `parent`, at the end of the child list.

`parent` : | the parent node
`cur` : | the child node
Returns : | the child or NULL in case of error.

### xmlReplaceNode ()

    xmlNodePtr  xmlReplaceNode                  (xmlNodePtr old,
                                                 xmlNodePtr cur);

Unlink the old node from it's current context, prune the new one at the same place. If cur was already inserted in a document it is first unlinked from its existing context.

`old` : | the old node
`cur` : | the node
Returns : | the old node

### xmlAddSibling ()

    xmlNodePtr  xmlAddSibling                   (xmlNodePtr cur,
                                                 xmlNodePtr elem);

Add a new element `elem` to the list of siblings of `cur` If the new element was already inserted in a document it is first unlinked from its existing context.

`cur` : | the child node
`elem` : | the new node
Returns : | the new element or NULL in case of error.

### xmlAddPrevSibling ()

    xmlNodePtr  xmlAddPrevSibling               (xmlNodePtr cur,
                                                 xmlNodePtr elem);

Add a new element `elem` as the previous siblings of `cur` If the new element was already inserted in a document it is first unlinked from its existing context.

`cur` : | the child node
`elem` : | the new node
Returns : | the new element or NULL in case of error.

### xmlAddNextSibling ()

    xmlNodePtr  xmlAddNextSibling               (xmlNodePtr cur,
                                                 xmlNodePtr elem);

Add a new element `elem` as the next siblings of `cur` If the new element was already inserted in a document it is first unlinked from its existing context.

`cur` : | the child node
`elem` : | the new node
Returns : | the new element or NULL in case of error.

### xmlUnlinkNode ()

    void        xmlUnlinkNode                   (xmlNodePtr cur);

Unlink a node from it's current context, the node is not freed

`cur` : | the node

### xmlTextMerge ()

    xmlNodePtr  xmlTextMerge                    (xmlNodePtr first,
                                                 xmlNodePtr second);

Merge two text nodes into one

`first` : | the first text node
`second` : | the second text node being merged
Returns : | the first text node augmented

### xmlTextConcat ()

    void        xmlTextConcat                   (xmlNodePtr node,
                                                 const xmlChar *content,
                                                 int len);

Concat the given string at the end of the existing node content

`node` : | the node
`content` : | the content
`len` : | `content` lenght

### xmlFreeNodeList ()

    void        xmlFreeNodeList                 (xmlNodePtr cur);

Free a node and all its siblings, this is a recursive behaviour, all the childs are freed too.

`cur` : | the first node in the list

### xmlFreeNode ()

    void        xmlFreeNode                     (xmlNodePtr cur);

Free a node, this is a recursive behaviour, all the childs are freed too.

`cur` : | the node

### xmlSearchNs ()

    xmlNsPtr    xmlSearchNs                     (xmlDocPtr doc,
                                                 xmlNodePtr node,
                                                 const xmlChar *nameSpace);

Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. `nameSpace` can be NULL, this is a search for the default namespace.

`doc` : | the document
`node` : | the current node
`nameSpace` : | the namespace string
Returns : | the namespace pointer or NULL.

### xmlSearchNsByHref ()

    xmlNsPtr    xmlSearchNsByHref               (xmlDocPtr doc,
                                                 xmlNodePtr node,
                                                 const xmlChar *href);

Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.

`doc` : | the document
`node` : | the current node
`href` : | the namespace value
Returns : | the namespace pointer or NULL.

### xmlGetNsList ()

    xmlNsPtr*   xmlGetNsList                    (xmlDocPtr doc,
                                                 xmlNodePtr node);

Search all the namespace applying to a given element.

`doc` : | the document
`node` : | the current node
Returns : | an NULL terminated array of all the xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined

### xmlSetNs ()

    void        xmlSetNs                        (xmlNodePtr node,
                                                 xmlNsPtr ns);

Associate a namespace to a node, a posteriori.

`node` : | a node in the document
`ns` : | a namespace pointer

### xmlCopyNamespace ()

    xmlNsPtr    xmlCopyNamespace                (xmlNsPtr cur);

Do a copy of the namespace.

`cur` : | the namespace
Returns : | a new xmlNsPtr, or NULL in case of error.

### xmlCopyNamespaceList ()

    xmlNsPtr    xmlCopyNamespaceList            (xmlNsPtr cur);

Do a copy of an namespace list.

`cur` : | the first namespace
Returns : | a new xmlNsPtr, or NULL in case of error.

### xmlSetProp ()

    xmlAttrPtr  xmlSetProp                      (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *value);

Set (or reset) an attribute carried by a node.

`node` : | the node
`name` : | the attribute name
`value` : | the attribute value
Returns : | the attribute pointer.

### xmlGetProp ()

    xmlChar*    xmlGetProp                      (xmlNodePtr node,
                                                 const xmlChar *name);

Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off.

`node` : | the node
`name` : | the attribute name
Returns : | the attribute value or NULL if not found. It's up to the caller to free the memory.

### xmlGetNsProp ()

    xmlChar*    xmlGetNsProp                    (xmlNodePtr node,
                                                 const xmlChar *name,
                                                 const xmlChar *nameSpace);

Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for FIXED or default declaration values unless DTD use has been turned off.

`node` : | the node
`name` : | the attribute name
`nameSpace` : | the URI of the namespace
Returns : | the attribute value or NULL if not found. It's up to the caller to free the memory.

### xmlStringGetNodeList ()

    xmlNodePtr  xmlStringGetNodeList            (xmlDocPtr doc,
                                                 const xmlChar *value);

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

`doc` : | the document
`value` : | the value of the attribute
Returns : | a pointer to the first child

### xmlStringLenGetNodeList ()

    xmlNodePtr  xmlStringLenGetNodeList         (xmlDocPtr doc,
                                                 const xmlChar *value,
                                                 int len);

Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.

`doc` : | the document
`value` : | the value of the text
`len` : | the length of the string value
Returns : | a pointer to the first child

### xmlNodeListGetString ()

    xmlChar*    xmlNodeListGetString            (xmlDocPtr doc,
                                                 xmlNodePtr list,
                                                 int inLine);

Returns the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs

`doc` : | the document
`list` : | a Node list
`inLine` : | should we replace entity contents or show their external form
Returns : | a pointer to the string copy, the calller must free it.

### xmlNodeSetContent ()

    void        xmlNodeSetContent               (xmlNodePtr cur,
                                                 const xmlChar *content);

Replace the content of a node.

`cur` : | the node being modified
`content` : | the new value of the content

### xmlNodeSetContentLen ()

    void        xmlNodeSetContentLen            (xmlNodePtr cur,
                                                 const xmlChar *content,
                                                 int len);

Replace the content of a node.

`cur` : | the node being modified
`content` : | the new value of the content
`len` : | the size of `content`

### xmlNodeAddContent ()

    void        xmlNodeAddContent               (xmlNodePtr cur,
                                                 const xmlChar *content);

Append the extra substring to the node content.

`cur` : | the node being modified
`content` : | extra content

### xmlNodeAddContentLen ()

    void        xmlNodeAddContentLen            (xmlNodePtr cur,
                                                 const xmlChar *content,
                                                 int len);

Append the extra substring to the node content.

`cur` : | the node being modified
`content` : | extra content
`len` : | the size of `content`

### xmlNodeGetContent ()

    xmlChar*    xmlNodeGetContent               (xmlNodePtr cur);

Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substitued.

`cur` : | the node being read
Returns : | a new xmlChar * or NULL if no content is available. It's up to the caller to free the memory.

### xmlNodeGetLang ()

    xmlChar*    xmlNodeGetLang                  (xmlNodePtr cur);

Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor.

`cur` : | the node being checked
Returns : | a pointer to the lang value, or NULL if not found It's up to the caller to free the memory.

### xmlNodeSetLang ()

    void        xmlNodeSetLang                  (xmlNodePtr cur,
                                                 const xmlChar *lang);

Set the language of a node, i.e. the values of the xml:lang attribute.

`cur` : | the node being changed
`lang` : | the langage description

### xmlNodeGetBase ()

    xmlChar*    xmlNodeGetBase                  (xmlDocPtr doc,
                                                 xmlNodePtr cur);

Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different.

`doc` : | the document the node pertains to
`cur` : | the node being checked
Returns : | a pointer to the base URL, or NULL if not found It's up to the caller to free the memory.

### xmlRemoveProp ()

    int         xmlRemoveProp                   (xmlAttrPtr cur);

Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes

`cur` : | an attribute
Returns : | 0 if success and -1 in case of error.

### xmlRemoveNode ()

    int         xmlRemoveNode                   (xmlNodePtr node);

`node` : |
Returns : |

### xmlBufferWriteCHAR ()

    void        xmlBufferWriteCHAR              (xmlBufferPtr buf,
                                                 const xmlChar *string);

routine which manage and grows an output buffer. This one add xmlChars at the end of the buffer.

`buf` : | the XML buffer
`string` : | the string to add

### xmlBufferWriteChar ()

    void        xmlBufferWriteChar              (xmlBufferPtr buf,
                                                 const char *string);

routine which manage and grows an output buffer. This one add C chars at the end of the array.

`buf` : | the XML buffer output
`string` : | the string to add

### xmlBufferWriteQuotedString ()

    void        xmlBufferWriteQuotedString      (xmlBufferPtr buf,
                                                 const xmlChar *string);

routine which manage and grows an output buffer. This one writes a quoted or double quoted xmlChar string, checking first if it holds quote or double-quotes internally

`buf` : | the XML buffer output
`string` : | the string to add

### xmlDocDumpMemory ()

    void        xmlDocDumpMemory                (xmlDocPtr cur,
                                                 xmlChar **mem,
                                                 int *size);

Dump an XML document in memory and return the xmlChar * and it's size. It's up to the caller to free the memory.

`cur` : | the document
`mem` : | OUT: the memory pointer
`size` : | OUT: the memory lenght

### xmlDocDump ()

    void        xmlDocDump                      (FILE *f,
                                                 xmlDocPtr cur);

Dump an XML document to an open FILE.

`f` : | the FILE*
`cur` : | the document

### xmlElemDump ()

    void        xmlElemDump                     (FILE *f,
                                                 xmlDocPtr cur,
                                                 xmlNodePtr elem);

Dump an XML/HTML node, recursive behaviour,children are printed too.

`f` : |
`cur` : | the current node
`elem` : |

### xmlSaveFile ()

    int         xmlSaveFile                     (const char *filename,
                                                 xmlDocPtr cur);

Dump an XML document to a file. Will use compression if compiled in and enabled. If `filename` is "-" the stdout file is used.

`filename` : | the filename
`cur` : | the document
Returns : | the number of file written or -1 in case of failure.

### xmlGetDocCompressMode ()

    int         xmlGetDocCompressMode           (xmlDocPtr doc);

get the compression ratio for a document, ZLIB based

`doc` : | the document
Returns : | 0 (uncompressed) to 9 (max compression)

### xmlSetDocCompressMode ()

    void        xmlSetDocCompressMode           (xmlDocPtr doc,
                                                 int mode);

set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

`doc` : | the document
`mode` : | the compression ratio

### xmlGetCompressMode ()

    int         xmlGetCompressMode              (void);

get the default compression mode used, ZLIB based.

Returns : | 0 (uncompressed) to 9 (max compression)

### xmlSetCompressMode ()

    void        xmlSetCompressMode              (int mode);

set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)

`mode` : | the compression ratio

<<< Previous Page | Home | Up | Next Page >>>
SAX | entities