## tree

tree - interfaces for tree manipulation

this module describes the structures found in an tree resulting from an XML or HTML parsing, as well as the API provided for various processing on that tree

Author(s): Daniel Veillard

## Synopsis

    #define LIBXML2_NEW_BUFFER;
    #define XML_GET_CONTENT;
    #define XML_GET_LINE;
    #define XML_LOCAL_NAMESPACE;
    #define XML_XML_ID;
    #define XML_XML_NAMESPACE;
    #define xmlBufferAllocScheme;
    #define xmlChildrenNode;
    #define xmlDefaultBufferSize;
    #define xmlRootNode;
    typedef struct _xmlAttr xmlAttr;
    typedef xmlAttr * xmlAttrPtr;
    typedef struct _xmlAttribute xmlAttribute;
    typedef enum xmlAttributeDefault;
    typedef xmlAttribute * xmlAttributePtr;
    typedef enum xmlAttributeType;
    typedef struct _xmlBuf xmlBuf;
    typedef xmlBuf * xmlBufPtr;
    typedef struct _xmlBuffer xmlBuffer;
    typedef enum xmlBufferAllocationScheme;
    typedef xmlBuffer * xmlBufferPtr;
    typedef struct _xmlDOMWrapCtxt xmlDOMWrapCtxt;
    typedef xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr;
    typedef struct _xmlDoc xmlDoc;
    typedef enum xmlDocProperties;
    typedef xmlDoc * xmlDocPtr;
    typedef struct _xmlDtd xmlDtd;
    typedef xmlDtd * xmlDtdPtr;
    typedef struct _xmlElement xmlElement;
    typedef struct _xmlElementContent xmlElementContent;
    typedef enum xmlElementContentOccur;
    typedef xmlElementContent * xmlElementContentPtr;
    typedef enum xmlElementContentType;
    typedef xmlElement * xmlElementPtr;
    typedef enum xmlElementType;
    typedef enum xmlElementTypeVal;
    typedef struct _xmlEntity xmlEntity;
    typedef xmlEntity * xmlEntityPtr;
    typedef struct _xmlEnumeration xmlEnumeration;
    typedef xmlEnumeration * xmlEnumerationPtr;
    typedef struct _xmlID xmlID;
    typedef xmlID * xmlIDPtr;
    typedef struct _xmlNode xmlNode;
    typedef xmlNode * xmlNodePtr;
    typedef struct _xmlNotation xmlNotation;
    typedef xmlNotation * xmlNotationPtr;
    typedef struct _xmlNs xmlNs;
    typedef xmlNs * xmlNsPtr;
    typedef xmlElementType xmlNsType;
    typedef struct _xmlOutputBuffer xmlOutputBuffer;
    typedef xmlOutputBuffer * xmlOutputBufferPtr;
    typedef struct _xmlParserCtxt xmlParserCtxt;
    typedef xmlParserCtxt * xmlParserCtxtPtr;
    typedef struct _xmlParserInput xmlParserInput;
    typedef struct _xmlParserInputBuffer xmlParserInputBuffer;
    typedef xmlParserInputBuffer * xmlParserInputBufferPtr;
    typedef xmlParserInput * xmlParserInputPtr;
    typedef struct _xmlRef xmlRef;
    typedef xmlRef * xmlRefPtr;
    typedef struct _xmlSAXHandler xmlSAXHandler;
    typedef xmlSAXHandler * xmlSAXHandlerPtr;
    typedef struct _xmlSAXLocator xmlSAXLocator;
    typedef xmlSAXLocator * xmlSAXLocatorPtr;
    xmlNodePtr	xmlAddChild		(xmlNodePtr parent,
    					 xmlNodePtr cur);
    xmlNodePtr	xmlAddChildList		(xmlNodePtr parent,
    					 xmlNodePtr cur);
    xmlNodePtr	xmlAddNextSibling	(xmlNodePtr prev,
    					 xmlNodePtr cur);
    xmlNodePtr	xmlAddPrevSibling	(xmlNodePtr next,
    					 xmlNodePtr cur);
    xmlNodePtr	xmlAddSibling		(xmlNodePtr node,
    					 xmlNodePtr cur);
    void	xmlAttrSerializeTxtContent	(xmlBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlAttrPtr attr,
    					 const xmlChar * string);
    xmlChar *	xmlBufContent		(const xmlBuf * buf);
    xmlChar *	xmlBufEnd		(xmlBufPtr buf);
    int	xmlBufGetNodeContent		(xmlBufPtr buf,
    					 const xmlNode * cur);
    size_t	xmlBufNodeDump			(xmlBufPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format);
    size_t	xmlBufShrink			(xmlBufPtr buf,
    					 size_t len);
    size_t	xmlBufUse			(const xmlBufPtr buf);
    int	xmlBufferAdd			(xmlBufferPtr buf,
    					 const xmlChar * str,
    					 int len);
    int	xmlBufferAddHead		(xmlBufferPtr buf,
    					 const xmlChar * str,
    					 int len);
    int	xmlBufferCCat			(xmlBufferPtr buf,
    					 const char * str);
    int	xmlBufferCat			(xmlBufferPtr buf,
    					 const xmlChar * str);
    const xmlChar *	xmlBufferContent	(const xmlBuffer * buf);
    xmlBufferPtr	xmlBufferCreate		(void);
    xmlBufferPtr	xmlBufferCreateSize	(size_t size);
    xmlBufferPtr	xmlBufferCreateStatic	(void * mem,
    					 size_t size);
    xmlChar *	xmlBufferDetach		(xmlBufferPtr buf);
    int	xmlBufferDump			(FILE * file,
    					 xmlBufferPtr buf);
    void	xmlBufferEmpty			(xmlBufferPtr buf);
    void	xmlBufferFree			(xmlBufferPtr buf);
    int	xmlBufferGrow			(xmlBufferPtr buf,
    					 unsigned int len);
    int	xmlBufferLength			(const xmlBuffer * buf);
    int	xmlBufferResize			(xmlBufferPtr buf,
    					 unsigned int size);
    void	xmlBufferSetAllocationScheme	(xmlBufferPtr buf,
    					 xmlBufferAllocationScheme scheme);
    int	xmlBufferShrink			(xmlBufferPtr buf,
    					 unsigned int len);
    void	xmlBufferWriteCHAR		(xmlBufferPtr buf,
    					 const xmlChar * string);
    void	xmlBufferWriteChar		(xmlBufferPtr buf,
    					 const char * string);
    void	xmlBufferWriteQuotedString	(xmlBufferPtr buf,
    					 const xmlChar * string);
    xmlChar *	xmlBuildQName		(const xmlChar * ncname,
    					 const xmlChar * prefix,
    					 xmlChar * memory,
    					 int len);
    unsigned long	xmlChildElementCount	(xmlNodePtr parent);
    xmlDocPtr	xmlCopyDoc		(xmlDocPtr doc,
    					 int recursive);
    xmlDtdPtr	xmlCopyDtd		(xmlDtdPtr dtd);
    xmlNsPtr	xmlCopyNamespace	(xmlNsPtr cur);
    xmlNsPtr	xmlCopyNamespaceList	(xmlNsPtr cur);
    xmlNodePtr	xmlCopyNode		(xmlNodePtr node,
    					 int extended);
    xmlNodePtr	xmlCopyNodeList		(xmlNodePtr node);
    xmlAttrPtr	xmlCopyProp		(xmlNodePtr target,
    					 xmlAttrPtr cur);
    xmlAttrPtr	xmlCopyPropList		(xmlNodePtr target,
    					 xmlAttrPtr cur);
    xmlDtdPtr	xmlCreateIntSubset	(xmlDocPtr doc,
    					 const xmlChar * name,
    					 const xmlChar * ExternalID,
    					 const xmlChar * SystemID);
    typedef xmlNsPtr xmlDOMWrapAcquireNsFunction	(xmlDOMWrapCtxtPtr ctxt,
    						 xmlNodePtr node,
    						 const xmlChar * nsName,
    						 const xmlChar * nsPrefix);
    int	xmlDOMWrapAdoptNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr sourceDoc,
    					 xmlNodePtr node,
    					 xmlDocPtr destDoc,
    					 xmlNodePtr destParent,
    					 int options);
    int	xmlDOMWrapCloneNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr sourceDoc,
    					 xmlNodePtr node,
    					 xmlNodePtr * resNode,
    					 xmlDocPtr destDoc,
    					 xmlNodePtr destParent,
    					 int deep,
    					 int options);
    void	xmlDOMWrapFreeCtxt		(xmlDOMWrapCtxtPtr ctxt);
    xmlDOMWrapCtxtPtr	xmlDOMWrapNewCtxt	(void);
    int	xmlDOMWrapReconcileNamespaces	(xmlDOMWrapCtxtPtr ctxt,
    					 xmlNodePtr elem,
    					 int options);
    int	xmlDOMWrapRemoveNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr doc,
    					 xmlNodePtr node,
    					 int options);
    xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func);
    typedef void xmlDeregisterNodeFunc		(xmlNodePtr node);
    xmlNodePtr	xmlDocCopyNode		(xmlNodePtr node,
    					 xmlDocPtr doc,
    					 int extended);
    xmlNodePtr	xmlDocCopyNodeList	(xmlDocPtr doc,
    					 xmlNodePtr node);
    int	xmlDocDump			(FILE * f,
    					 xmlDocPtr cur);
    void	xmlDocDumpFormatMemory		(xmlDocPtr cur,
    					 xmlChar ** mem,
    					 int * size,
    					 int format);
    void	xmlDocDumpFormatMemoryEnc	(xmlDocPtr out_doc,
    					 xmlChar ** doc_txt_ptr,
    					 int * doc_txt_len,
    					 const char * txt_encoding,
    					 int format);
    void	xmlDocDumpMemory		(xmlDocPtr cur,
    					 xmlChar ** mem,
    					 int * size);
    void	xmlDocDumpMemoryEnc		(xmlDocPtr out_doc,
    					 xmlChar ** doc_txt_ptr,
    					 int * doc_txt_len,
    					 const char * txt_encoding);
    int	xmlDocFormatDump		(FILE * f,
    					 xmlDocPtr cur,
    					 int format);
    xmlNodePtr	xmlDocGetRootElement	(const xmlDoc * doc);
    xmlNodePtr	xmlDocSetRootElement	(xmlDocPtr doc,
    					 xmlNodePtr root);
    void	xmlElemDump			(FILE * f,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur);
    xmlNodePtr	xmlFirstElementChild	(xmlNodePtr parent);
    void	xmlFreeDoc			(xmlDocPtr cur);
    void	xmlFreeDtd			(xmlDtdPtr cur);
    void	xmlFreeNode			(xmlNodePtr cur);
    void	xmlFreeNodeList			(xmlNodePtr cur);
    void	xmlFreeNs			(xmlNsPtr cur);
    void	xmlFreeNsList			(xmlNsPtr cur);
    void	xmlFreeProp			(xmlAttrPtr cur);
    void	xmlFreePropList			(xmlAttrPtr cur);
    xmlBufferAllocationScheme	xmlGetBufferAllocationScheme	(void);
    int	xmlGetCompressMode		(void);
    int	xmlGetDocCompressMode		(const xmlDoc * doc);
    xmlDtdPtr	xmlGetIntSubset		(const xmlDoc * doc);
    xmlNodePtr	xmlGetLastChild		(const xmlNode * parent);
    long	xmlGetLineNo			(const xmlNode * node);
    xmlChar *	xmlGetNoNsProp		(const xmlNode * node,
    					 const xmlChar * name);
    xmlChar *	xmlGetNodePath		(const xmlNode * node);
    xmlNsPtr *	xmlGetNsList		(const xmlDoc * doc,
    					 const xmlNode * node);
    int	xmlGetNsListSafe		(const xmlDoc * doc,
    					 const xmlNode * node,
    					 xmlNsPtr ** out);
    xmlChar *	xmlGetNsProp		(const xmlNode * node,
    					 const xmlChar * name,
    					 const xmlChar * nameSpace);
    xmlChar *	xmlGetProp		(const xmlNode * node,
    					 const xmlChar * name);
    xmlAttrPtr	xmlHasNsProp		(const xmlNode * node,
    					 const xmlChar * name,
    					 const xmlChar * nameSpace);
    xmlAttrPtr	xmlHasProp		(const xmlNode * node,
    					 const xmlChar * name);
    int	xmlIsBlankNode			(const xmlNode * node);
    int	xmlIsXHTML			(const xmlChar * systemID,
    					 const xmlChar * publicID);
    xmlNodePtr	xmlLastElementChild	(xmlNodePtr parent);
    xmlNodePtr	xmlNewCDataBlock	(xmlDocPtr doc,
    					 const xmlChar * content,
    					 int len);
    xmlNodePtr	xmlNewCharRef		(xmlDocPtr doc,
    					 const xmlChar * name);
    xmlNodePtr	xmlNewChild		(xmlNodePtr parent,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewComment		(const xmlChar * content);
    xmlDocPtr	xmlNewDoc		(const xmlChar * version);
    xmlNodePtr	xmlNewDocComment	(xmlDocPtr doc,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewDocFragment	(xmlDocPtr doc);
    xmlNodePtr	xmlNewDocNode		(xmlDocPtr doc,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewDocNodeEatName	(xmlDocPtr doc,
    					 xmlNsPtr ns,
    					 xmlChar * name,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewDocPI		(xmlDocPtr doc,
    					 const xmlChar * name,
    					 const xmlChar * content);
    xmlAttrPtr	xmlNewDocProp		(xmlDocPtr doc,
    					 const xmlChar * name,
    					 const xmlChar * value);
    xmlNodePtr	xmlNewDocRawNode	(xmlDocPtr doc,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewDocText		(const xmlDoc * doc,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewDocTextLen	(xmlDocPtr doc,
    					 const xmlChar * content,
    					 int len);
    xmlDtdPtr	xmlNewDtd		(xmlDocPtr doc,
    					 const xmlChar * name,
    					 const xmlChar * ExternalID,
    					 const xmlChar * SystemID);
    xmlNodePtr	xmlNewNode		(xmlNsPtr ns,
    					 const xmlChar * name);
    xmlNodePtr	xmlNewNodeEatName	(xmlNsPtr ns,
    					 xmlChar * name);
    xmlNsPtr	xmlNewNs		(xmlNodePtr node,
    					 const xmlChar * href,
    					 const xmlChar * prefix);
    xmlAttrPtr	xmlNewNsProp		(xmlNodePtr node,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * value);
    xmlAttrPtr	xmlNewNsPropEatName	(xmlNodePtr node,
    					 xmlNsPtr ns,
    					 xmlChar * name,
    					 const xmlChar * value);
    xmlNodePtr	xmlNewPI		(const xmlChar * name,
    					 const xmlChar * content);
    xmlAttrPtr	xmlNewProp		(xmlNodePtr node,
    					 const xmlChar * name,
    					 const xmlChar * value);
    xmlNodePtr	xmlNewReference		(const xmlDoc * doc,
    					 const xmlChar * name);
    xmlNodePtr	xmlNewText		(const xmlChar * content);
    xmlNodePtr	xmlNewTextChild		(xmlNodePtr parent,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * content);
    xmlNodePtr	xmlNewTextLen		(const xmlChar * content,
    					 int len);
    xmlNodePtr	xmlNextElementSibling	(xmlNodePtr node);
    int	xmlNodeAddContent		(xmlNodePtr cur,
    					 const xmlChar * content);
    int	xmlNodeAddContentLen		(xmlNodePtr cur,
    					 const xmlChar * content,
    					 int len);
    int	xmlNodeBufGetContent		(xmlBufferPtr buffer,
    					 const xmlNode * cur);
    int	xmlNodeDump			(xmlBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format);
    void	xmlNodeDumpOutput		(xmlOutputBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format,
    					 const char * encoding);
    int	xmlNodeGetAttrValue		(const xmlNode * node,
    					 const xmlChar * name,
    					 const xmlChar * nsUri,
    					 xmlChar ** out);
    xmlChar *	xmlNodeGetBase		(const xmlDoc * doc,
    					 const xmlNode * cur);
    int	xmlNodeGetBaseSafe		(const xmlDoc * doc,
    					 const xmlNode * cur,
    					 xmlChar ** baseOut);
    xmlChar *	xmlNodeGetContent	(const xmlNode * cur);
    xmlChar *	xmlNodeGetLang		(const xmlNode * cur);
    int	xmlNodeGetSpacePreserve		(const xmlNode * cur);
    int	xmlNodeIsText			(const xmlNode * node);
    xmlChar *	xmlNodeListGetRawString	(const xmlDoc * doc,
    					 const xmlNode * list,
    					 int inLine);
    xmlChar *	xmlNodeListGetString	(xmlDocPtr doc,
    					 const xmlNode * list,
    					 int inLine);
    int	xmlNodeSetBase			(xmlNodePtr cur,
    					 const xmlChar * uri);
    int	xmlNodeSetContent		(xmlNodePtr cur,
    					 const xmlChar * content);
    int	xmlNodeSetContentLen		(xmlNodePtr cur,
    					 const xmlChar * content,
    					 int len);
    int	xmlNodeSetLang			(xmlNodePtr cur,
    					 const xmlChar * lang);
    void	xmlNodeSetName			(xmlNodePtr cur,
    					 const xmlChar * name);
    int	xmlNodeSetSpacePreserve		(xmlNodePtr cur,
    					 int val);
    xmlNodePtr	xmlPreviousElementSibling	(xmlNodePtr node);
    int	xmlReconciliateNs		(xmlDocPtr doc,
    					 xmlNodePtr tree);
    xmlRegisterNodeFunc	xmlRegisterNodeDefault	(xmlRegisterNodeFunc func);
    typedef void xmlRegisterNodeFunc		(xmlNodePtr node);
    int	xmlRemoveProp			(xmlAttrPtr cur);
    xmlNodePtr	xmlReplaceNode		(xmlNodePtr old,
    					 xmlNodePtr cur);
    int	xmlSaveFile			(const char * filename,
    					 xmlDocPtr cur);
    int	xmlSaveFileEnc			(const char * filename,
    					 xmlDocPtr cur,
    					 const char * encoding);
    int	xmlSaveFileTo			(xmlOutputBufferPtr buf,
    					 xmlDocPtr cur,
    					 const char * encoding);
    int	xmlSaveFormatFile		(const char * filename,
    					 xmlDocPtr cur,
    					 int format);
    int	xmlSaveFormatFileEnc		(const char * filename,
    					 xmlDocPtr cur,
    					 const char * encoding,
    					 int format);
    int	xmlSaveFormatFileTo		(xmlOutputBufferPtr buf,
    					 xmlDocPtr cur,
    					 const char * encoding,
    					 int format);
    xmlNsPtr	xmlSearchNs		(xmlDocPtr doc,
    					 xmlNodePtr node,
    					 const xmlChar * nameSpace);
    xmlNsPtr	xmlSearchNsByHref	(xmlDocPtr doc,
    					 xmlNodePtr node,
    					 const xmlChar * href);
    void	xmlSetBufferAllocationScheme	(xmlBufferAllocationScheme scheme);
    void	xmlSetCompressMode		(int mode);
    void	xmlSetDocCompressMode		(xmlDocPtr doc,
    					 int mode);
    int	xmlSetListDoc			(xmlNodePtr list,
    					 xmlDocPtr doc);
    void	xmlSetNs			(xmlNodePtr node,
    					 xmlNsPtr ns);
    xmlAttrPtr	xmlSetNsProp		(xmlNodePtr node,
    					 xmlNsPtr ns,
    					 const xmlChar * name,
    					 const xmlChar * value);
    xmlAttrPtr	xmlSetProp		(xmlNodePtr node,
    					 const xmlChar * name,
    					 const xmlChar * value);
    int	xmlSetTreeDoc			(xmlNodePtr tree,
    					 xmlDocPtr doc);
    xmlChar *	xmlSplitQName2		(const xmlChar * name,
    					 xmlChar ** prefix);
    const xmlChar *	xmlSplitQName3		(const xmlChar * name,
    					 int * len);
    xmlNodePtr	xmlStringGetNodeList	(const xmlDoc * doc,
    					 const xmlChar * value);
    xmlNodePtr	xmlStringLenGetNodeList	(const xmlDoc * doc,
    					 const xmlChar * value,
    					 int len);
    int	xmlTextConcat			(xmlNodePtr node,
    					 const xmlChar * content,
    					 int len);
    xmlNodePtr	xmlTextMerge		(xmlNodePtr first,
    					 xmlNodePtr second);
    xmlDeregisterNodeFunc	xmlThrDefDeregisterNodeDefault	(xmlDeregisterNodeFunc func);
    xmlRegisterNodeFunc	xmlThrDefRegisterNodeDefault	(xmlRegisterNodeFunc func);
    void	xmlUnlinkNode			(xmlNodePtr cur);
    int	xmlUnsetNsProp			(xmlNodePtr node,
    					 xmlNsPtr ns,
    					 const xmlChar * name);
    int	xmlUnsetProp			(xmlNodePtr node,
    					 const xmlChar * name);
    int	xmlValidateNCName		(const xmlChar * value,
    					 int space);
    int	xmlValidateNMToken		(const xmlChar * value,
    					 int space);
    int	xmlValidateName			(const xmlChar * value,
    					 int space);
    int	xmlValidateQName		(const xmlChar * value,
    					 int space);

## Description

## Details

### Macro LIBXML2_NEW_BUFFER

    #define LIBXML2_NEW_BUFFER;

Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.

### Macro XML_GET_CONTENT

    #define XML_GET_CONTENT;

Macro to extract the content pointer of a node.

### Macro XML_GET_LINE

    #define XML_GET_LINE;

Macro to extract the line number of an element node.

### Macro XML_LOCAL_NAMESPACE

    #define XML_LOCAL_NAMESPACE;

A namespace declaration node.

### Macro XML_XML_ID

    #define XML_XML_ID;

This is the name for the special xml:id attribute

### Macro XML_XML_NAMESPACE

    #define XML_XML_NAMESPACE;

This is the namespace for the special xml: prefix predefined in the XML Namespace specification.

### Macro xmlBufferAllocScheme

    #define xmlBufferAllocScheme;

### Macro xmlChildrenNode

    #define xmlChildrenNode;

Macro for compatibility naming layer with libxml1. Maps to "children."

### Macro xmlDefaultBufferSize

    #define xmlDefaultBufferSize;

### Macro xmlRootNode

    #define xmlRootNode;

Macro for compatibility naming layer with libxml1. Maps to "children".

### Structure xmlAttr

    struct _xmlAttr {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlNode *	parent
        struct _xmlAttr *	next
        struct _xmlAttr *	prev
        struct _xmlDoc *	doc
        xmlNs *	ns
        xmlAttributeType	atype
        void *	psvi
        struct _xmlID *	id
    } xmlAttr;

### Typedef xmlAttrPtr

    xmlAttr * xmlAttrPtr;

### Structure xmlAttribute

    struct _xmlAttribute {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlDtd *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        struct _xmlAttribute *	nexth
        xmlAttributeType	atype
        xmlAttributeDefault	def
        const xmlChar *	defaultValue
        xmlEnumerationPtr	tree
        const xmlChar *	prefix
        const xmlChar *	elem
    } xmlAttribute;

### Enum xmlAttributeDefault

    enum xmlAttributeDefault {
        XML_ATTRIBUTE_NONE = 1
        XML_ATTRIBUTE_REQUIRED = 2
        XML_ATTRIBUTE_IMPLIED = 3
        XML_ATTRIBUTE_FIXED = 4
    };

### Typedef xmlAttributePtr

    xmlAttribute * xmlAttributePtr;

### Enum xmlAttributeType

    enum xmlAttributeType {
        XML_ATTRIBUTE_CDATA = 1
        XML_ATTRIBUTE_ID = 2
        XML_ATTRIBUTE_IDREF = 3
        XML_ATTRIBUTE_IDREFS = 4
        XML_ATTRIBUTE_ENTITY = 5
        XML_ATTRIBUTE_ENTITIES = 6
        XML_ATTRIBUTE_NMTOKEN = 7
        XML_ATTRIBUTE_NMTOKENS = 8
        XML_ATTRIBUTE_ENUMERATION = 9
        XML_ATTRIBUTE_NOTATION = 10
    };

### Structure xmlBuf

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

### Typedef xmlBufPtr

    xmlBuf * xmlBufPtr;

A pointer to a buffer structure, the actual structure internals are not public

### Structure xmlBuffer

    struct _xmlBuffer {
        xmlChar *	content
        unsigned int	use
        unsigned int	size
        xmlBufferAllocationScheme	alloc
        xmlChar *	contentIO
    } xmlBuffer;

### Enum xmlBufferAllocationScheme

    enum xmlBufferAllocationScheme {
        XML_BUFFER_ALLOC_DOUBLEIT = 1 /* double each time one need to grow */
        XML_BUFFER_ALLOC_EXACT = 2 /* grow only to the minimal size */
        XML_BUFFER_ALLOC_IMMUTABLE = 3 /* immutable buffer, deprecated */
        XML_BUFFER_ALLOC_IO = 4 /* special allocation scheme used for I/O */
        XML_BUFFER_ALLOC_HYBRID = 5 /* exact up to a threshold, and doubleit thereafter */
        XML_BUFFER_ALLOC_BOUNDED = 6 /*  limit the upper size of the buffer */
    };

### Typedef xmlBufferPtr

    xmlBuffer * xmlBufferPtr;

### Structure xmlDOMWrapCtxt

    struct _xmlDOMWrapCtxt {
        void *	_private
        int	type
        void *	namespaceMap
        xmlDOMWrapAcquireNsFunction	getNsForNodeFunc
    } xmlDOMWrapCtxt;

### Typedef xmlDOMWrapCtxtPtr

    xmlDOMWrapCtxt * xmlDOMWrapCtxtPtr;

### Structure xmlDoc

    struct _xmlDoc {
        void *	_private
        xmlElementType	type
        char *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlNode *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        int	compression
        int	standalone
        struct _xmlDtd *	intSubset
        struct _xmlDtd *	extSubset
        struct _xmlNs *	oldNs
        const xmlChar *	version
        const xmlChar *	encoding
        void *	ids
        void *	refs
        const xmlChar *	URL
        int	charset
        struct _xmlDict *	dict
        void *	psvi
        int	parseFlags
        int	properties
    } xmlDoc;

### Enum xmlDocProperties

    enum xmlDocProperties {
        XML_DOC_WELLFORMED = 1 /* document is XML well formed */
        XML_DOC_NSVALID = 2 /* document is Namespace valid */
        XML_DOC_OLD10 = 4 /* parsed with old XML-1.0 parser */
        XML_DOC_DTDVALID = 8 /* DTD validation was successful */
        XML_DOC_XINCLUDE = 16 /* XInclude substitution was done */
        XML_DOC_USERBUILT = 32 /* Document was built using the API and not by parsing an instance */
        XML_DOC_INTERNAL = 64 /* built for internal processing */
        XML_DOC_HTML = 128 /*  parsed or built HTML document */
    };

### Typedef xmlDocPtr

    xmlDoc * xmlDocPtr;

### Structure xmlDtd

    struct _xmlDtd {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlDoc *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        void *	notations
        void *	elements
        void *	attributes
        void *	entities
        const xmlChar *	ExternalID
        const xmlChar *	SystemID
        void *	pentities
    } xmlDtd;

### Typedef xmlDtdPtr

    xmlDtd * xmlDtdPtr;

### Structure xmlElement

    struct _xmlElement {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlDtd *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        xmlElementTypeVal	etype
        xmlElementContentPtr	content
        xmlAttributePtr	attributes
        const xmlChar *	prefix
        xmlRegexpPtr	contModel
        void *	contModel
    } xmlElement;

### Structure xmlElementContent

    struct _xmlElementContent {
        xmlElementContentType	type
        xmlElementContentOccur	ocur
        const xmlChar *	name
        struct _xmlElementContent *	c1
        struct _xmlElementContent *	c2
        struct _xmlElementContent *	parent
        const xmlChar *	prefix
    } xmlElementContent;

### Enum xmlElementContentOccur

    enum xmlElementContentOccur {
        XML_ELEMENT_CONTENT_ONCE = 1
        XML_ELEMENT_CONTENT_OPT = 2
        XML_ELEMENT_CONTENT_MULT = 3
        XML_ELEMENT_CONTENT_PLUS = 4
    };

### Typedef xmlElementContentPtr

    xmlElementContent * xmlElementContentPtr;

### Enum xmlElementContentType

    enum xmlElementContentType {
        XML_ELEMENT_CONTENT_PCDATA = 1
        XML_ELEMENT_CONTENT_ELEMENT = 2
        XML_ELEMENT_CONTENT_SEQ = 3
        XML_ELEMENT_CONTENT_OR = 4
    };

### Typedef xmlElementPtr

    xmlElement * xmlElementPtr;

### Enum xmlElementType

    enum xmlElementType {
        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 /* unused */
        XML_PI_NODE = 7
        XML_COMMENT_NODE = 8
        XML_DOCUMENT_NODE = 9
        XML_DOCUMENT_TYPE_NODE = 10 /* unused */
        XML_DOCUMENT_FRAG_NODE = 11
        XML_NOTATION_NODE = 12 /* unused */
        XML_HTML_DOCUMENT_NODE = 13
        XML_DTD_NODE = 14
        XML_ELEMENT_DECL = 15
        XML_ATTRIBUTE_DECL = 16
        XML_ENTITY_DECL = 17
        XML_NAMESPACE_DECL = 18
        XML_XINCLUDE_START = 19
        XML_XINCLUDE_END = 20 /*  XML_DOCB_DOCUMENT_NODE= 21 removed */
    };

### Enum xmlElementTypeVal

    enum xmlElementTypeVal {
        XML_ELEMENT_TYPE_UNDEFINED = 0
        XML_ELEMENT_TYPE_EMPTY = 1
        XML_ELEMENT_TYPE_ANY = 2
        XML_ELEMENT_TYPE_MIXED = 3
        XML_ELEMENT_TYPE_ELEMENT = 4
    };

### Structure xmlEntity

    struct _xmlEntity {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlDtd *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        xmlChar *	orig
        xmlChar *	content
        int	length
        xmlEntityType	etype
        const xmlChar *	ExternalID
        const xmlChar *	SystemID
        struct _xmlEntity *	nexte
        const xmlChar *	URI
        int	owner
        int	flags
        unsigned long	expandedSize
    } xmlEntity;

### Typedef xmlEntityPtr

    xmlEntity * xmlEntityPtr;

### Structure xmlEnumeration

    struct _xmlEnumeration {
        struct _xmlEnumeration *	next
        const xmlChar *	name
    } xmlEnumeration;

### Typedef xmlEnumerationPtr

    xmlEnumeration * xmlEnumerationPtr;

### Structure xmlID

    struct _xmlID {
        struct _xmlID *	next
        const xmlChar *	value
        xmlAttrPtr	attr
        const xmlChar *	name
        int	lineno
        struct _xmlDoc *	doc
    } xmlID;

### Typedef xmlIDPtr

    xmlID * xmlIDPtr;

### Structure xmlNode

    struct _xmlNode {
        void *	_private
        xmlElementType	type
        const xmlChar *	name
        struct _xmlNode *	children
        struct _xmlNode *	last
        struct _xmlNode *	parent
        struct _xmlNode *	next
        struct _xmlNode *	prev
        struct _xmlDoc *	doc
        xmlNs *	ns
        xmlChar *	content
        struct _xmlAttr *	properties
        xmlNs *	nsDef
        void *	psvi
        unsigned short	line
        unsigned short	extra
    } xmlNode;

### Typedef xmlNodePtr

    xmlNode * xmlNodePtr;

### Structure xmlNotation

    struct _xmlNotation {
        const xmlChar *	name
        const xmlChar *	PublicID
        const xmlChar *	SystemID
    } xmlNotation;

### Typedef xmlNotationPtr

    xmlNotation * xmlNotationPtr;

### Structure xmlNs

    struct _xmlNs {
        struct _xmlNs *	next
        xmlNsType	type
        const xmlChar *	href
        const xmlChar *	prefix
        void *	_private
        struct _xmlDoc *	context
    } xmlNs;

### Typedef xmlNsPtr

    xmlNs * xmlNsPtr;

### Typedef xmlNsType

    xmlElementType xmlNsType;

### Structure xmlOutputBuffer

    struct _xmlOutputBuffer {
        void *	context
        xmlOutputWriteCallback	writecallback
        xmlOutputCloseCallback	closecallback
        xmlCharEncodingHandlerPtr	encoder
        xmlBufPtr	buffer
        xmlBufPtr	conv
        int	written
        int	error
    } xmlOutputBuffer;

### Typedef xmlOutputBufferPtr

    xmlOutputBuffer * xmlOutputBufferPtr;

### Structure xmlParserCtxt

    struct _xmlParserCtxt {
        struct _xmlSAXHandler *	sax
        void *	userData
        xmlDocPtr	myDoc
        int	wellFormed
        int	replaceEntities
        const xmlChar *	version
        const xmlChar *	encoding
        int	standalone
        int	html
        xmlParserInputPtr	input
        int	inputNr
        int	inputMax
        xmlParserInputPtr *	inputTab
        xmlNodePtr	node
        int	nodeNr
        int	nodeMax
        xmlNodePtr *	nodeTab
        int	record_info
        xmlParserNodeInfoSeq	node_seq
        int	errNo
        int	hasExternalSubset
        int	hasPErefs
        int	external
        int	valid
        int	validate
        xmlValidCtxt	vctxt
        xmlParserInputState	instate
        int	token
        char *	directory
        const xmlChar *	name
        int	nameNr
        int	nameMax
        const xmlChar **	nameTab
        long	nbChars
        long	checkIndex
        int	keepBlanks
        int	disableSAX
        int	inSubset
        const xmlChar *	intSubName
        xmlChar *	extSubURI
        xmlChar *	extSubSystem
        int *	space
        int	spaceNr
        int	spaceMax
        int *	spaceTab
        int	depth
        xmlParserInputPtr	entity
        int	charset
        int	nodelen
        int	nodemem
        int	pedantic
        void *	_private
        int	loadsubset
        int	linenumbers
        void *	catalogs
        int	recovery
        int	progressive
        xmlDictPtr	dict
        const xmlChar **	atts
        int	maxatts
        int	docdict
        const xmlChar *	str_xml
        const xmlChar *	str_xmlns
        const xmlChar *	str_xml_ns
        int	sax2
        int	nsNr
        int	nsMax
        const xmlChar **	nsTab
        unsigned *	attallocs
        xmlStartTag *	pushTab
        xmlHashTablePtr	attsDefault
        xmlHashTablePtr	attsSpecial
        int	nsWellFormed
        int	options
        int	dictNames
        int	freeElemsNr
        xmlNodePtr	freeElems
        int	freeAttrsNr
        xmlAttrPtr	freeAttrs
        xmlError	lastError
        xmlParserMode	parseMode
        unsigned long	nbentities
        unsigned long	sizeentities
        xmlParserNodeInfo *	nodeInfo
        int	nodeInfoNr
        int	nodeInfoMax
        xmlParserNodeInfo *	nodeInfoTab
        int	input_id
        unsigned long	sizeentcopy
        int	endCheckState
        unsigned short	nbErrors
        unsigned short	nbWarnings
        unsigned	maxAmpl
        xmlParserNsData *	nsdb
        unsigned	attrHashMax
        xmlAttrHashBucket *	attrHash
        xmlStructuredErrorFunc	errorHandler
        void *	errorCtxt
        xmlResourceLoader	resourceLoader
        void *	resourceCtxt
        xmlCharEncConvImpl	convImpl
        void *	convCtxt
    } xmlParserCtxt;

### Typedef xmlParserCtxtPtr

    xmlParserCtxt * xmlParserCtxtPtr;

### Structure xmlParserInput

    struct _xmlParserInput {
        xmlParserInputBufferPtr	buf
        const char *	filename
        const char *	directory
        const xmlChar *	base
        const xmlChar *	cur
        const xmlChar *	end
        int	length
        int	line
        int	col
        unsigned long	consumed
        xmlParserInputDeallocate	free
        const xmlChar *	encoding
        const xmlChar *	version
        int	flags
        int	id
        unsigned long	parentConsumed
        xmlEntityPtr	entity
    } xmlParserInput;

### Structure xmlParserInputBuffer

    struct _xmlParserInputBuffer {
        void *	context
        xmlInputReadCallback	readcallback
        xmlInputCloseCallback	closecallback
        xmlCharEncodingHandlerPtr	encoder
        xmlBufPtr	buffer
        xmlBufPtr	raw
        int	compressed
        int	error
        unsigned long	rawconsumed
    } xmlParserInputBuffer;

### Typedef xmlParserInputBufferPtr

    xmlParserInputBuffer * xmlParserInputBufferPtr;

### Typedef xmlParserInputPtr

    xmlParserInput * xmlParserInputPtr;

### Structure xmlRef

    struct _xmlRef {
        struct _xmlRef *	next
        const xmlChar *	value
        xmlAttrPtr	attr
        const xmlChar *	name
        int	lineno
    } xmlRef;

### Typedef xmlRefPtr

    xmlRef * xmlRefPtr;

### Structure xmlSAXHandler

    struct _xmlSAXHandler {
        internalSubsetSAXFunc	internalSubset
        isStandaloneSAXFunc	isStandalone
        hasInternalSubsetSAXFunc	hasInternalSubset
        hasExternalSubsetSAXFunc	hasExternalSubset
        resolveEntitySAXFunc	resolveEntity
        getEntitySAXFunc	getEntity
        entityDeclSAXFunc	entityDecl
        notationDeclSAXFunc	notationDecl
        attributeDeclSAXFunc	attributeDecl
        elementDeclSAXFunc	elementDecl
        unparsedEntityDeclSAXFunc	unparsedEntityDecl
        setDocumentLocatorSAXFunc	setDocumentLocator
        startDocumentSAXFunc	startDocument
        endDocumentSAXFunc	endDocument
        startElementSAXFunc	startElement
        endElementSAXFunc	endElement
        referenceSAXFunc	reference
        charactersSAXFunc	characters
        ignorableWhitespaceSAXFunc	ignorableWhitespace
        processingInstructionSAXFunc	processingInstruction
        commentSAXFunc	comment
        warningSAXFunc	warning
        errorSAXFunc	error
        fatalErrorSAXFunc	fatalError
        getParameterEntitySAXFunc	getParameterEntity
        cdataBlockSAXFunc	cdataBlock
        externalSubsetSAXFunc	externalSubset
        unsigned int	initialized
        void *	_private
        startElementNsSAX2Func	startElementNs
        endElementNsSAX2Func	endElementNs
        xmlStructuredErrorFunc	serror
    } xmlSAXHandler;

### Typedef xmlSAXHandlerPtr

    xmlSAXHandler * xmlSAXHandlerPtr;

### Structure xmlSAXLocator

    struct _xmlSAXLocator {
        const xmlChar *(*getPublicId)	getPublicId
        const xmlChar *(*getSystemId)	getSystemId
        int(*getLineNumber)	getLineNumber
        int(*getColumnNumber)	getColumnNumber
    } xmlSAXLocator;

### Typedef xmlSAXLocatorPtr

    xmlSAXLocator * xmlSAXLocatorPtr;

### Function type xmlDOMWrapAcquireNsFunction

    xmlNsPtr	xmlDOMWrapAcquireNsFunction	(xmlDOMWrapCtxtPtr ctxt,
    						 xmlNodePtr node,
    						 const xmlChar * nsName,
    						 const xmlChar * nsPrefix)

A function called to acquire namespaces (xmlNs) from the wrapper.

`ctxt`: | a DOM wrapper context
`node`: | the context node (element or attribute)
`nsName`: | the requested namespace name
`nsPrefix`: | the requested namespace prefix
`Returns`: | an xmlNsPtr or NULL in case of an error.

### Function type xmlDeregisterNodeFunc

    void	xmlDeregisterNodeFunc		(xmlNodePtr node)

Signature for the deregistration callback of a discarded node

`node`: | the current node

### Function type xmlRegisterNodeFunc

    void	xmlRegisterNodeFunc		(xmlNodePtr node)

Signature for the registration callback of a created node

`node`: | the current node

### xmlAddChild ()

    xmlNodePtr	xmlAddChild		(xmlNodePtr parent,
    					 xmlNodePtr cur)

Unlink @cur and append it to the children of @parent. If @cur is a text node, it may be merged with an adjacent text node and freed. In this case the text node containing the merged content is returned. If @cur is an attribute node, it is appended to the attributes of @parent. If the attribute list contains an attribute with a name matching @cur, the old attribute is destroyed. General notes: Move operations like xmlAddChild can cause element or attribute nodes to reference namespaces that aren't declared in one of their ancestors. This can lead to use-after-free errors if the elements containing the declarations are freed later, especially when moving nodes from one document to another. You should consider calling xmlReconciliateNs after a move operation to normalize namespaces. Another option is to call xmlDOMWrapAdoptNode with the target parent before moving a node. For the most part, move operations don't check whether the resulting tree structure is valid. Users must make sure that parent nodes only receive children of valid types. Inserted child nodes must never be an ancestor of the parent node to avoid cycles in the tree structure. In general, only document, document fragments, elements and attributes should be used as parent nodes. When moving a node between documents and a memory allocation fails, the node's content will be corrupted and it will be unlinked. In this case, the node must be freed manually. Moving DTDs between documents isn't supported.

`parent`: | the parent node
`cur`: | the child node
`Returns`: | @cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.

### xmlAddChildList ()

    xmlNodePtr	xmlAddChildList		(xmlNodePtr parent,
    					 xmlNodePtr cur)

Append a node list to another node. See xmlAddChild.

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

### xmlAddNextSibling ()

    xmlNodePtr	xmlAddNextSibling	(xmlNodePtr prev,
    					 xmlNodePtr cur)

Unlinks @cur and inserts it as next sibling after @prev. Unlike xmlAddChild this function does not merge text nodes. If @cur is an attribute node, it is inserted after attribute @prev. If the attribute list contains an attribute with a name matching @cur, the old attribute is destroyed. See the notes in xmlAddChild.

`prev`: | the target node
`cur`: | the new node
`Returns`: | @cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.

### xmlAddPrevSibling ()

    xmlNodePtr	xmlAddPrevSibling	(xmlNodePtr next,
    					 xmlNodePtr cur)

Unlinks @cur and inserts it as previous sibling before @next. Unlike xmlAddChild this function does not merge text nodes. If @cur is an attribute node, it is inserted before attribute @next. If the attribute list contains an attribute with a name matching @cur, the old attribute is destroyed. See the notes in xmlAddChild.

`next`: | the target node
`cur`: | the new node
`Returns`: | @cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.

### xmlAddSibling ()

    xmlNodePtr	xmlAddSibling		(xmlNodePtr node,
    					 xmlNodePtr cur)

Unlinks @cur and inserts it as last sibling of @node. If @cur is a text node, it may be merged with an adjacent text node and freed. In this case the text node containing the merged content is returned. If @cur is an attribute node, it is appended to the attribute list containing @node. If the attribute list contains an attribute with a name matching @cur, the old attribute is destroyed. See the notes in xmlAddChild.

`node`: | the target node
`cur`: | the new node
`Returns`: | @cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.

### xmlAttrSerializeTxtContent ()

    void	xmlAttrSerializeTxtContent	(xmlBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlAttrPtr attr,
    					 const xmlChar * string)

Serialize text attribute values to an xml simple buffer

`buf`: | the XML buffer output
`doc`: | the document
`attr`: | the attribute node
`string`: | the text content

### xmlBufContent ()

    xmlChar *	xmlBufContent		(const xmlBuf * buf)

Function to extract the content of a buffer

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

### xmlBufEnd ()

    xmlChar *	xmlBufEnd		(xmlBufPtr buf)

Function to extract the end of the content of a buffer

`buf`: | the buffer
`Returns`: | the end of the internal content or NULL in case of error

### xmlBufGetNodeContent ()

    int	xmlBufGetNodeContent		(xmlBufPtr buf,
    					 const xmlNode * cur)

Read the value of a node @cur, 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 substituted. Fills up the buffer @buf with this value

`buf`: | a buffer xmlBufPtr
`cur`: | the node being read
`Returns`: | 0 in case of success and -1 in case of error.

### xmlBufNodeDump ()

    size_t	xmlBufNodeDump			(xmlBufPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format)

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

`buf`: | the XML buffer output
`doc`: | the document
`cur`: | the current node
`level`: | the imbrication level for indenting
`format`: | is formatting allowed
`Returns`: | the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error

### xmlBufShrink ()

    size_t	xmlBufShrink			(xmlBufPtr buf,
    					 size_t len)

DEPRECATED: Don't use. Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.

`buf`: | the buffer to dump
`len`: | the number of xmlChar to remove
`Returns`: | the number of byte removed or 0 in case of failure

### xmlBufUse ()

    size_t	xmlBufUse			(const xmlBufPtr buf)

Function to get the length of a buffer

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

### xmlBufferAdd ()

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

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

`buf`: | the buffer to dump
`str`: | the #xmlChar string
`len`: | the number of #xmlChar to add
`Returns`: | a xmlParserErrors code.

### xmlBufferAddHead ()

    int	xmlBufferAddHead		(xmlBufferPtr buf,
    					 const xmlChar * str,
    					 int len)

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

`buf`: | the buffer
`str`: | the #xmlChar string
`len`: | the number of #xmlChar to add
`Returns`: | a xmlParserErrors code.

### xmlBufferCCat ()

    int	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
`Returns`: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

### xmlBufferCat ()

    int	xmlBufferCat			(xmlBufferPtr buf,
    					 const xmlChar * str)

Append a zero terminated string to an XML buffer.

`buf`: | the buffer to add to
`str`: | the #xmlChar string
`Returns`: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error.

### xmlBufferContent ()

    const xmlChar *	xmlBufferContent	(const xmlBuffer * buf)

Function to extract the content of a buffer

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

### 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.

### xmlBufferCreateStatic ()

    xmlBufferPtr	xmlBufferCreateStatic	(void * mem,
    					 size_t size)

`mem`: | the memory area
`size`: | the size in byte
`Returns`: | an XML buffer initialized with bytes.

### xmlBufferDetach ()

    xmlChar *	xmlBufferDetach		(xmlBufferPtr buf)

Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.

`buf`: | the buffer
`Returns`: | the previous string contained by the buffer.

### 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

### xmlBufferEmpty ()

    void	xmlBufferEmpty			(xmlBufferPtr buf)

empty a buffer.

`buf`: | the buffer

### xmlBufferFree ()

    void	xmlBufferFree			(xmlBufferPtr buf)

Frees an XML buffer. It frees both the content and the structure which encapsulate it.

`buf`: | the buffer to free

### xmlBufferGrow ()

    int	xmlBufferGrow			(xmlBufferPtr buf,
    					 unsigned int len)

DEPRECATED: Don't use. Grow the available space of an XML buffer.

`buf`: | the buffer
`len`: | the minimum free size to allocate
`Returns`: | the new available space or -1 in case of error

### xmlBufferLength ()

    int	xmlBufferLength			(const xmlBuffer * buf)

Function to get the length of a buffer

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

### xmlBufferResize ()

    int	xmlBufferResize			(xmlBufferPtr buf,
    					 unsigned int size)

DEPRECATED: Don't use. Resize a buffer to accommodate minimum size of @size.

`buf`: | the buffer to resize
`size`: | the desired size
`Returns`: | 0 in case of problems, 1 otherwise

### xmlBufferSetAllocationScheme ()

    void	xmlBufferSetAllocationScheme	(xmlBufferPtr buf,
    					 xmlBufferAllocationScheme scheme)

Sets the allocation scheme for this buffer. For libxml2 before 2.14, it is recommended to set this to XML_BUFFER_ALLOC_DOUBLE_IT. Has no effect on 2.14 or later.

`buf`: | the buffer to tune
`scheme`: | allocation scheme to use

### xmlBufferShrink ()

    int	xmlBufferShrink			(xmlBufferPtr buf,
    					 unsigned int len)

DEPRECATED: Don't use. 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.

### xmlBufferWriteCHAR ()

    void	xmlBufferWriteCHAR		(xmlBufferPtr buf,
    					 const xmlChar * string)

routine which manages and grows an output buffer. This one adds 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

### xmlBuildQName ()

    xmlChar *	xmlBuildQName		(const xmlChar * ncname,
    					 const xmlChar * prefix,
    					 xmlChar * memory,
    					 int len)

Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.

`ncname`: | the Name
`prefix`: | the prefix
`memory`: | preallocated memory
`len`: | preallocated memory length
`Returns`: | the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error

### xmlChildElementCount ()

    unsigned long	xmlChildElementCount	(xmlNodePtr parent)

Count the number of child nodes which are elements. Note that entity references are not expanded.

`parent`: | the parent node
`Returns`: | the number of element children or 0 if arguments are invalid.

### xmlCopyDoc ()

    xmlDocPtr	xmlCopyDoc		(xmlDocPtr doc,
    					 int recursive)

Copy a document. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.

`doc`: | the document
`recursive`: | if not zero do a recursive copy.
`Returns`: | the copied document or NULL if a memory allocation failed.

### xmlCopyDtd ()

    xmlDtdPtr	xmlCopyDtd		(xmlDtdPtr dtd)

Copy a DTD.

`dtd`: | the DTD
`Returns`: | the copied DTD or NULL if a memory allocation failed.

### xmlCopyNamespace ()

    xmlNsPtr	xmlCopyNamespace	(xmlNsPtr cur)

Copy a namespace.

`cur`: | the namespace
`Returns`: | the copied namespace or NULL if a memory allocation failed.

### xmlCopyNamespaceList ()

    xmlNsPtr	xmlCopyNamespaceList	(xmlNsPtr cur)

Copy a namespace list.

`cur`: | the first namespace
`Returns`: | the head of the copied list or NULL if a memory allocation failed.

### xmlCopyNode ()

    xmlNodePtr	xmlCopyNode		(xmlNodePtr node,
    					 int extended)

Copy a node. Use of this function is DISCOURAGED in favor of xmlDocCopyNode.

`node`: | the node
`extended`: | if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)
`Returns`: | the copied node or NULL if a memory allocation failed.

### xmlCopyNodeList ()

    xmlNodePtr	xmlCopyNodeList		(xmlNodePtr node)

Copy a node list and all children. Use of this function is DISCOURAGED in favor of xmlDocCopyNodeList.

`node`: | the first node in the list.
`Returns`: | the head of the copied list or NULL if a memory allocation failed.

### xmlCopyProp ()

    xmlAttrPtr	xmlCopyProp		(xmlNodePtr target,
    					 xmlAttrPtr cur)

Create a copy of the attribute. This function sets the parent pointer of the copy to @target but doesn't set the attribute on the target element. Users should consider to set the attribute by calling xmlAddChild afterwards or reset the parent pointer to NULL.

`target`: | the element where the attribute will be grafted
`cur`: | the attribute
`Returns`: | the copied attribute or NULL if a memory allocation failed.

### xmlCopyPropList ()

    xmlAttrPtr	xmlCopyPropList		(xmlNodePtr target,
    					 xmlAttrPtr cur)

Create a copy of an attribute list. This function sets the parent pointers of the copied attributes to @target but doesn't set the attributes on the target element.

`target`: | the element where the attributes will be grafted
`cur`: | the first attribute
`Returns`: | the head of the copied list or NULL if a memory allocation failed.

### xmlCreateIntSubset ()

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

Create a DTD node. If a document is provided and it already has an internal subset, the existing DTD object is returned without creating a new object. If the document has no internal subset, it will be set to the created DTD.

`doc`: | the document pointer (optional)
`name`: | the DTD name (optional)
`ExternalID`: | the external (PUBLIC) ID (optional)
`SystemID`: | the system ID (optional)
`Returns`: | a pointer to the new or existing DTD object or NULL if arguments are invalid or a memory allocation failed.

### xmlDOMWrapAdoptNode ()

    int	xmlDOMWrapAdoptNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr sourceDoc,
    					 xmlNodePtr node,
    					 xmlDocPtr destDoc,
    					 xmlNodePtr destParent,
    					 int options)

References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used This is the case when you have an unlinked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.

`ctxt`: | the optional context for custom processing
`sourceDoc`: | the optional sourceDoc
`node`: | the node to start with
`destDoc`: | the destination doc
`destParent`: | the optional new parent of @node in @destDoc
`options`: | option flags
`Returns`: | 0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors.

### xmlDOMWrapCloneNode ()

    int	xmlDOMWrapCloneNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr sourceDoc,
    					 xmlNodePtr node,
    					 xmlNodePtr * resNode,
    					 xmlDocPtr destDoc,
    					 xmlNodePtr destParent,
    					 int deep,
    					 int options)

References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.

`ctxt`: | the optional context for custom processing
`sourceDoc`: | the optional sourceDoc
`node`: | the node to start with
`resNode`: | the clone of the given @node
`destDoc`: | the destination doc
`destParent`: | the optional new parent of @node in @destDoc
`deep`: | descend into child if set
`options`: | option flags
`Returns`: | 0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.

### xmlDOMWrapFreeCtxt ()

    void	xmlDOMWrapFreeCtxt		(xmlDOMWrapCtxtPtr ctxt)

Frees the DOM-wrapper context.

`ctxt`: | the DOM-wrapper context

### xmlDOMWrapNewCtxt ()

    xmlDOMWrapCtxtPtr	xmlDOMWrapNewCtxt	(void)

Allocates and initializes a new DOM-wrapper context.

`Returns`: | the xmlDOMWrapCtxtPtr or NULL in case of an internal error.

### xmlDOMWrapReconcileNamespaces ()

    int	xmlDOMWrapReconcileNamespaces	(xmlDOMWrapCtxtPtr ctxt,
    					 xmlNodePtr elem,
    					 int options)

Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.

`ctxt`: | DOM wrapper context, unused at the moment
`elem`: | the element-node
`options`: | option flags
`Returns`: | 0 if succeeded, -1 otherwise and on API/internal errors.

### xmlDOMWrapRemoveNode ()

    int	xmlDOMWrapRemoveNode		(xmlDOMWrapCtxtPtr ctxt,
    					 xmlDocPtr doc,
    					 xmlNodePtr node,
    					 int options)

Unlinks the given node from its owner. This will substitute ns-references to node->nsDef for ns-references to doc->oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.

`ctxt`: | a DOM wrapper context
`doc`: | the doc
`node`: | the node to be removed.
`options`: | set of options, unused at the moment
`Returns`: | 0 on success, 1 if the node is not supported, -1 on API and internal errors.

### xmlDeregisterNodeDefault ()

    xmlDeregisterNodeFunc	xmlDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

DEPRECATED: don't use Registers a callback for node destruction

`func`: | function pointer to the new DeregisterNodeFunc
`Returns`: | the previous value of the deregistration function

### xmlDocCopyNode ()

    xmlNodePtr	xmlDocCopyNode		(xmlNodePtr node,
    					 xmlDocPtr doc,
    					 int extended)

Copy a node into another document.

`node`: | the node
`doc`: | the document
`extended`: | if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)
`Returns`: | the copied node or NULL if a memory allocation failed.

### xmlDocCopyNodeList ()

    xmlNodePtr	xmlDocCopyNodeList	(xmlDocPtr doc,
    					 xmlNodePtr node)

Copy a node list and all children into a new document.

`doc`: | the target document
`node`: | the first node in the list.
`Returns`: | the head of the copied list or NULL if a memory allocation failed.

### xmlDocDump ()

    int	xmlDocDump			(FILE * f,
    					 xmlDocPtr cur)

Dump an XML document to an open FILE.

`f`: | the FILE*
`cur`: | the document
`Returns`: | the number of bytes written or -1 in case of failure.

### xmlDocDumpFormatMemory ()

    void	xmlDocDumpFormatMemory		(xmlDocPtr cur,
    					 xmlChar ** mem,
    					 int * size,
    					 int format)

Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

`cur`: | the document
`mem`: | OUT: the memory pointer
`size`: | OUT: the memory length
`format`: | should formatting spaces been added

### xmlDocDumpFormatMemoryEnc ()

    void	xmlDocDumpFormatMemoryEnc	(xmlDocPtr out_doc,
    					 xmlChar ** doc_txt_ptr,
    					 int * doc_txt_len,
    					 const char * txt_encoding,
    					 int format)

Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

`out_doc`: | Document to generate XML text from
`doc_txt_ptr`: | Memory pointer for allocated XML text
`doc_txt_len`: | Length of the generated XML text
`txt_encoding`: | Character encoding to use when generating XML text
`format`: | should formatting spaces been added

### xmlDocDumpMemory ()

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

Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.

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

### xmlDocDumpMemoryEnc ()

    void	xmlDocDumpMemoryEnc		(xmlDocPtr out_doc,
    					 xmlChar ** doc_txt_ptr,
    					 int * doc_txt_len,
    					 const char * txt_encoding)

Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().

`out_doc`: | Document to generate XML text from
`doc_txt_ptr`: | Memory pointer for allocated XML text
`doc_txt_len`: | Length of the generated XML text
`txt_encoding`: | Character encoding to use when generating XML text

### xmlDocFormatDump ()

    int	xmlDocFormatDump		(FILE * f,
    					 xmlDocPtr cur,
    					 int format)

Dump an XML document to an open FILE.

`f`: | the FILE*
`cur`: | the document
`format`: | should formatting spaces been added
`Returns`: | the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

### xmlDocGetRootElement ()

    xmlNodePtr	xmlDocGetRootElement	(const xmlDoc * doc)

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

`doc`: | the document
`Returns`: | the root element or NULL if no element was found.

### xmlDocSetRootElement ()

    xmlNodePtr	xmlDocSetRootElement	(xmlDocPtr doc,
    					 xmlNodePtr root)

Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...). @root must be an element node. It is unlinked before insertion.

`doc`: | the document
`root`: | the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.
`Returns`: | the unlinked old root element or NULL if the document didn't have a root element or a memory allocation failed.

### xmlElemDump ()

    void	xmlElemDump			(FILE * f,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur)

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

`f`: | the FILE * for the output
`doc`: | the document
`cur`: | the current node

### xmlFirstElementChild ()

    xmlNodePtr	xmlFirstElementChild	(xmlNodePtr parent)

Find the first child node which is an element. Note that entity references are not expanded.

`parent`: | the parent node
`Returns`: | the first element or NULL if parent has no children.

### xmlFreeDoc ()

    void	xmlFreeDoc			(xmlDocPtr cur)

Free a document including all children and associated DTDs.

`cur`: | pointer to the document

### xmlFreeDtd ()

    void	xmlFreeDtd			(xmlDtdPtr cur)

Free a DTD structure.

`cur`: | the DTD structure to free up

### xmlFreeNode ()

    void	xmlFreeNode			(xmlNodePtr cur)

Free a node including all the children. This doesn't unlink the node from the tree. Call xmlUnlinkNode first unless @cur is a root node.

`cur`: | the node

### xmlFreeNodeList ()

    void	xmlFreeNodeList			(xmlNodePtr cur)

Free a node list including all children.

`cur`: | the first node in the list

### xmlFreeNs ()

    void	xmlFreeNs			(xmlNsPtr cur)

Free an xmlNs object.

`cur`: | the namespace pointer

### xmlFreeNsList ()

    void	xmlFreeNsList			(xmlNsPtr cur)

Free a list of xmlNs objects.

`cur`: | the first namespace pointer

### xmlFreeProp ()

    void	xmlFreeProp			(xmlAttrPtr cur)

Free an attribute including all children.

`cur`: | an attribute

### xmlFreePropList ()

    void	xmlFreePropList			(xmlAttrPtr cur)

Free an attribute list including all children.

`cur`: | the first attribute in the list

### xmlGetBufferAllocationScheme ()

    xmlBufferAllocationScheme	xmlGetBufferAllocationScheme	(void)

DEPRECATED: Use xmlBufferSetAllocationScheme. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance XML_BUFFER_ALLOC_HYBRID - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.

`Returns`: | the current allocation scheme

### xmlGetCompressMode ()

    int	xmlGetCompressMode		(void)

DEPRECATED: Use xmlGetDocCompressMode get the default compression mode used, ZLIB based.

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

### xmlGetDocCompressMode ()

    int	xmlGetDocCompressMode		(const xmlDoc * doc)

get the compression ratio for a document, ZLIB based

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

### xmlGetIntSubset ()

    xmlDtdPtr	xmlGetIntSubset		(const xmlDoc * doc)

Get the internal subset of a document.

`doc`: | the document pointer
`Returns`: | a pointer to the DTD object or NULL if not found.

### xmlGetLastChild ()

    xmlNodePtr	xmlGetLastChild		(const xmlNode * parent)

Find the last child of a node.

`parent`: | the parent node
`Returns`: | the last child or NULL if parent has no children.

### xmlGetLineNo ()

    long	xmlGetLineNo			(const xmlNode * node)

Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used

`node`: | valid node
`Returns`: | the line number if successful, -1 otherwise

### xmlGetNoNsProp ()

    xmlChar *	xmlGetNoNsProp		(const xmlNode * 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. This function is similar to xmlGetProp except it will accept only an attribute in no namespace. NOTE: This function doesn't allow to distinguish malloc failures from missing attributes. It's more robust to use xmlNodeGetAttrValue.

`node`: | the node
`name`: | the attribute name
`Returns`: | the attribute value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().

### xmlGetNodePath ()

    xmlChar *	xmlGetNodePath		(const xmlNode * node)

Build a structure based Path for the given node

`node`: | a node
`Returns`: | the new path or NULL in case of error. The caller must free the returned string

### xmlGetNsList ()

    xmlNsPtr *	xmlGetNsList		(const xmlDoc * doc,
    					 const xmlNode * node)

Find all in-scope namespaces of a node. Use xmlGetNsListSafe for better error reporting.

`doc`: | the document
`node`: | the current node
`Returns`: | a NULL terminated array of namespace pointers that must be freed by the caller or NULL if no namespaces were found or a memory allocation failed.

### xmlGetNsListSafe ()

    int	xmlGetNsListSafe		(const xmlDoc * doc,
    					 const xmlNode * node,
    					 xmlNsPtr ** out)

Find all in-scope namespaces of a node. @out returns a NULL terminated array of namespace pointers that must be freed by the caller. Available since 2.13.0.

`doc`: | the document
`node`: | the current node
`out`: | the returned namespace array
`Returns`: | 0 on success, 1 if no namespaces were found, -1 if a memory allocation failed.

### xmlGetNsProp ()

    xmlChar *	xmlGetNsProp		(const xmlNode * 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. NOTE: This function doesn't allow to distinguish malloc failures from missing attributes. It's more robust to use xmlNodeGetAttrValue.

`node`: | the node
`name`: | the attribute name
`nameSpace`: | the URI of the namespace
`Returns`: | the attribute value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().

### xmlGetProp ()

    xmlChar *	xmlGetProp		(const xmlNode * 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. NOTE: This function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing. NOTE: This function doesn't allow to distinguish malloc failures from missing attributes. It's more robust to use xmlNodeGetAttrValue.

`node`: | the node
`name`: | the attribute name
`Returns`: | the attribute value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().

### xmlHasNsProp ()

    xmlAttrPtr	xmlHasNsProp		(const xmlNode * node,
    					 const xmlChar * name,
    					 const xmlChar * nameSpace)

Search for 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. Note that a namespace of NULL indicates to use the default namespace.

`node`: | the node
`name`: | the attribute name
`nameSpace`: | the URI of the namespace
`Returns`: | the attribute or the attribute declaration or NULL if neither was found. Also returns NULL if a memory allocation failed making this function unreliable.

### xmlHasProp ()

    xmlAttrPtr	xmlHasProp		(const xmlNode * node,
    					 const xmlChar * name)

Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values.

`node`: | the node
`name`: | the attribute name
`Returns`: | the attribute or the attribute declaration or NULL if neither was found. Also returns NULL if a memory allocation failed making this function unreliable.

### xmlIsBlankNode ()

    int	xmlIsBlankNode			(const xmlNode * node)

Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.

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

### xmlIsXHTML ()

    int	xmlIsXHTML			(const xmlChar * systemID,
    					 const xmlChar * publicID)

Try to find if the document correspond to an XHTML DTD

`systemID`: | the system identifier
`publicID`: | the public identifier
`Returns`: | 1 if true, 0 if not and -1 in case of error

### xmlLastElementChild ()

    xmlNodePtr	xmlLastElementChild	(xmlNodePtr parent)

Find the last child node which is an element. Note that entity references are not expanded.

`parent`: | the parent node
`Returns`: | the last element or NULL if parent has no children.

### xmlNewCDataBlock ()

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

Create a CDATA section node.

`doc`: | the target document (optional)
`content`: | raw text content (optional)
`len`: | size of text content
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewCharRef ()

    xmlNodePtr	xmlNewCharRef		(xmlDocPtr doc,
    					 const xmlChar * name)

This function is MISNAMED. It doesn't create a character reference but an entity reference. Create an empty entity reference node. This function doesn't attempt to look up the entity in @doc. Entity names like '&entity;' are handled as well.

`doc`: | the target document (optional)
`name`: | the entity name
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewChild ()

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

Create a new child element and append it to a parent element. If @ns is NULL, the newly created element inherits the namespace of the parent. If provided, @content is expected to be a valid XML attribute value possibly containing character and entity references. Text and entity reference node will be added to the child element, see xmlNewDocNode.

`parent`: | the parent node
`ns`: | a namespace (optional)
`name`: | the name of the child
`content`: | text content with XML references (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewComment ()

    xmlNodePtr	xmlNewComment		(const xmlChar * content)

Use of this function is DISCOURAGED in favor of xmlNewDocComment. Create a comment node.

`content`: | the comment content (optional)
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewDoc ()

    xmlDocPtr	xmlNewDoc		(const xmlChar * version)

Creates a new XML document. If version is NULL, "1.0" is used.

`version`: | XML version string like "1.0" (optional)
`Returns`: | a new document or NULL if a memory allocation failed.

### xmlNewDocComment ()

    xmlNodePtr	xmlNewDocComment	(xmlDocPtr doc,
    					 const xmlChar * content)

Create a comment node.

`doc`: | the document
`content`: | the comment content
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewDocFragment ()

    xmlNodePtr	xmlNewDocFragment	(xmlDocPtr doc)

Create a document fragment node.

`doc`: | the target document (optional)
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewDocNode ()

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

Create an element node. If provided, @content is expected to be a valid XML attribute value possibly containing character and entity references. Syntax errors and references to undeclared entities are ignored silently. Only references are handled, nested elements, comments or PIs are not. See xmlNewDocRawNode for an alternative. General notes on object creation: Each node and all its children are associated with the same document. The document should be provided when creating nodes to avoid a performance penalty when adding the node to a document tree. Note that a document only owns nodes reachable from the root node. Unlinked subtrees must be freed manually.

`doc`: | the target document
`ns`: | namespace (optional)
`name`: | the node name
`content`: | text content with XML references (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewDocNodeEatName ()

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

Create an element node. Like xmlNewDocNode, but the @name string will be used directly without making a copy. Takes ownership of @name which will also be freed on error.

`doc`: | the target document
`ns`: | namespace (optional)
`name`: | the node name
`content`: | text content with XML references (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewDocPI ()

    xmlNodePtr	xmlNewDocPI		(xmlDocPtr doc,
    					 const xmlChar * name,
    					 const xmlChar * content)

Create a processing instruction object.

`doc`: | the target document (optional)
`name`: | the processing instruction target
`content`: | the PI content (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewDocProp ()

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

Create an attribute object. If provided, @value is expected to be a valid XML attribute value possibly containing character and entity references. Syntax errors and references to undeclared entities are ignored silently. If you want to pass a raw string, see xmlNewProp.

`doc`: | the target document (optional)
`name`: | the name of the attribute
`value`: | attribute value with XML references (optional)
`Returns`: | a pointer to the attribute or NULL if arguments are invalid or a memory allocation failed.

### xmlNewDocRawNode ()

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

Create an element node. If provided, @value should be a raw, unescaped string.

`doc`: | the target document
`ns`: | namespace (optional)
`name`: | the node name
`content`: | raw text content (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewDocText ()

    xmlNodePtr	xmlNewDocText		(const xmlDoc * doc,
    					 const xmlChar * content)

Create a new text node.

`doc`: | the target document
`content`: | raw text content (optional)
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewDocTextLen ()

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

Create a new text node.

`doc`: | the target document
`content`: | raw text content (optional)
`len`: | size of text content
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewDtd ()

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

Create a DTD node. If a document is provided, it is an error if it already has an external subset. If the document has no external subset, it will be set to the created DTD. To create an internal subset, use xmlCreateIntSubset().

`doc`: | the document pointer (optional)
`name`: | the DTD name (optional)
`ExternalID`: | the external ID (optional)
`SystemID`: | the system ID (optional)
`Returns`: | a pointer to the new DTD object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewNode ()

    xmlNodePtr	xmlNewNode		(xmlNsPtr ns,
    					 const xmlChar * name)

Create an element node. Use of this function is DISCOURAGED in favor of xmlNewDocNode.

`ns`: | namespace (optional)
`name`: | the node name
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewNodeEatName ()

    xmlNodePtr	xmlNewNodeEatName	(xmlNsPtr ns,
    					 xmlChar * name)

Create an element node. Use of this function is DISCOURAGED in favor of xmlNewDocNodeEatName. Like xmlNewNode, but the @name string will be used directly without making a copy. Takes ownership of @name which will also be freed on error.

`ns`: | namespace (optional)
`name`: | the node name
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewNs ()

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

Create a new namespace. For a default namespace, @prefix should be NULL. The namespace URI in @href is not checked. You should make sure to pass a valid URI. If @node is provided, it must be an element node. The namespace will be appended to the node's namespace declarations. It is an error if the node already has a definition for the prefix or default namespace.

`node`: | the element carrying the namespace (optional)
`href`: | the URI associated
`prefix`: | the prefix for the namespace (optional)
`Returns`: | a new namespace pointer or NULL if arguments are invalid, the prefix is already in use or a memory allocation failed.

### xmlNewNsProp ()

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

Create an attribute object. If provided, @value should be a raw, unescaped string. If @node is provided, the created attribute will be appended without checking for duplicate names. It is an error if @node is not an element.

`node`: | the parent node (optional)
`ns`: | the namespace (optional)
`name`: | the local name of the attribute
`value`: | the value of the attribute (optional)
`Returns`: | a pointer to the attribute or NULL if arguments are invalid or a memory allocation failed.

### xmlNewNsPropEatName ()

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

Like xmlNewNsProp, but the @name string will be used directly without making a copy. Takes ownership of @name which will also be freed on error.

`node`: | the parent node (optional)
`ns`: | the namespace (optional)
`name`: | the local name of the attribute
`value`: | the value of the attribute (optional)
`Returns`: | a pointer to the attribute or NULL if arguments are invalid or a memory allocation failed.

### xmlNewPI ()

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

Create a processing instruction node. Use of this function is DISCOURAGED in favor of xmlNewDocPI.

`name`: | the processing instruction target
`content`: | the PI content (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewProp ()

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

Create an attribute node. If provided, @value should be a raw, unescaped string. If @node is provided, the created attribute will be appended without checking for duplicate names. It is an error if @node is not an element.

`node`: | the parent node (optional)
`name`: | the name of the attribute
`value`: | the value of the attribute (optional)
`Returns`: | a pointer to the attribute or NULL if arguments are invalid or a memory allocation failed.

### xmlNewReference ()

    xmlNodePtr	xmlNewReference		(const xmlDoc * doc,
    					 const xmlChar * name)

Create a new entity reference node, linking the result with the entity in @doc if found. Entity names like '&entity;' are handled as well.

`doc`: | the target document (optional)
`name`: | the entity name
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewText ()

    xmlNodePtr	xmlNewText		(const xmlChar * content)

Create a text node. Use of this function is DISCOURAGED in favor of xmlNewDocText.

`content`: | raw text content (optional)
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNewTextChild ()

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

Create a new child element and append it to a parent element. If @ns is NULL, the newly created element inherits the namespace of the parent. If @content is provided, a text node will be added to the child element, see xmlNewDocRawNode.

`parent`: | the parent node
`ns`: | a namespace (optional)
`name`: | the name of the child
`content`: | raw text content of the child (optional)
`Returns`: | a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.

### xmlNewTextLen ()

    xmlNodePtr	xmlNewTextLen		(const xmlChar * content,
    					 int len)

Use of this function is DISCOURAGED in favor of xmlNewDocTextLen.

`content`: | raw text content (optional)
`len`: | size of text content
`Returns`: | a pointer to the new node object or NULL if a memory allocation failed.

### xmlNextElementSibling ()

    xmlNodePtr	xmlNextElementSibling	(xmlNodePtr node)

Find the closest following sibling which is a element. Note that entity references are not expanded.

`node`: | the current node
`Returns`: | the sibling or NULL if no sibling was found.

### xmlNodeAddContent ()

    int	xmlNodeAddContent		(xmlNodePtr cur,
    					 const xmlChar * content)

Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.

`cur`: | the node being modified
`content`: | extra content
`Returns`: | 0 on success, 1 on error, -1 if a memory allocation failed.

### xmlNodeAddContentLen ()

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

Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.

`cur`: | the node being modified
`content`: | extra content
`len`: | the size of @content
`Returns`: | 0 on success, 1 on error, -1 if a memory allocation failed.

### xmlNodeBufGetContent ()

    int	xmlNodeBufGetContent		(xmlBufferPtr buffer,
    					 const xmlNode * cur)

Read the value of a node @cur, 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 substituted. Fills up the buffer @buffer with this value

`buffer`: | a buffer
`cur`: | the node being read
`Returns`: | 0 in case of success and -1 in case of error.

### xmlNodeDump ()

    int	xmlNodeDump			(xmlBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format)

Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called. Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlNodeDumpOutput() instead.

`buf`: | the XML buffer output
`doc`: | the document
`cur`: | the current node
`level`: | the imbrication level for indenting
`format`: | is formatting allowed
`Returns`: | the number of bytes written to the buffer or -1 in case of error

### xmlNodeDumpOutput ()

    void	xmlNodeDumpOutput		(xmlOutputBufferPtr buf,
    					 xmlDocPtr doc,
    					 xmlNodePtr cur,
    					 int level,
    					 int format,
    					 const char * encoding)

Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

`buf`: | the XML buffer output
`doc`: | the document
`cur`: | the current node
`level`: | the imbrication level for indenting
`format`: | is formatting allowed
`encoding`: | an optional encoding string

### xmlNodeGetAttrValue ()

    int	xmlNodeGetAttrValue		(const xmlNode * node,
    					 const xmlChar * name,
    					 const xmlChar * nsUri,
    					 xmlChar ** out)

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. The returned value must be freed by the caller. Available since 2.13.0.

`node`: | the node
`name`: | the attribute name
`nsUri`: | the URI of the namespace
`out`: | the returned string
`Returns`: | 0 on success, 1 if no attribute was found, -1 if a memory allocation failed.

### xmlNodeGetBase ()

    xmlChar *	xmlNodeGetBase		(const xmlDoc * doc,
    					 const xmlNode * cur)

See xmlNodeGetBaseSafe. This function doesn't allow to distinguish memory allocation failures from a non-existing base.

`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 with xmlFree().

### xmlNodeGetBaseSafe ()

    int	xmlNodeGetBaseSafe		(const xmlDoc * doc,
    					 const xmlNode * cur,
    					 xmlChar ** baseOut)

Searches for the BASE URL. The code should work on both XML and HTML document even if base mechanisms are completely different. It returns the base as defined in RFC 2396 sections 5.1.1. Base URI within Document Content and 5.1.2. Base URI from the Encapsulating Entity However it does not return the document base (5.1.3), use doc->URL in this case Available since 2.13.0.

`doc`: | the document the node pertains to
`cur`: | the node being checked
`baseOut`: | pointer to base
`Returns`: | 0 in case of success, 1 if a URI or argument is invalid, -1 if a memory allocation failed.

### xmlNodeGetContent ()

    xmlChar *	xmlNodeGetContent	(const xmlNode * 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 substituted.

`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 with xmlFree().

### xmlNodeGetLang ()

    xmlChar *	xmlNodeGetLang		(const xmlNode * 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 with xmlFree().

### xmlNodeGetSpacePreserve ()

    int	xmlNodeGetSpacePreserve		(const xmlNode * cur)

Searches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor.

`cur`: | the node being checked
`Returns`: | -1 if xml:space is not inherited, 0 if "default", 1 if "preserve"

### xmlNodeIsText ()

    int	xmlNodeIsText			(const xmlNode * node)

Is this node a Text node ?

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

### xmlNodeListGetRawString ()

    xmlChar *	xmlNodeListGetRawString	(const xmlDoc * doc,
    					 const xmlNode * list,
    					 int inLine)

Serializes attribute children (text and entity reference nodes) into a string. If @inLine is true, entity references will be substituted. Otherwise, entity references will be kept and special characters like '&' will be escaped.

`doc`: | a document (optional)
`list`: | a node list of attribute children
`inLine`: | whether entity references are substituted
`Returns`: | a string or NULL if a memory allocation failed.

### xmlNodeListGetString ()

    xmlChar *	xmlNodeListGetString	(xmlDocPtr doc,
    					 const xmlNode * list,
    					 int inLine)

Serializes attribute children (text and entity reference nodes) into a string. If @inLine is true, entity references will be substituted. Otherwise, entity references will be kept and special characters like '&' as well as non-ASCII chars will be escaped. See xmlNodeListGetRawString for an alternative option.

`doc`: | a document (optional)
`list`: | a node list of attribute children
`inLine`: | whether entity references are substituted
`Returns`: | a string or NULL if a memory allocation failed.

### xmlNodeSetBase ()

    int	xmlNodeSetBase			(xmlNodePtr cur,
    					 const xmlChar * uri)

Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.

`cur`: | the node being changed
`uri`: | the new base URI
`Returns`: | 0 on success, -1 on error.

### xmlNodeSetContent ()

    int	xmlNodeSetContent		(xmlNodePtr cur,
    					 const xmlChar * content)

Replace the text content of a node. Sets the raw text content of text, CDATA, comment or PI nodes. For element and attribute nodes, removes all children and replaces them by parsing @content which is expected to be a valid XML attribute value possibly containing character and entity references. Syntax errors and references to undeclared entities are ignored silently. Unfortunately, there isn't an API to pass raw content directly. An inefficient work-around is to escape the content with xmlEncodeSpecialChars before passing it. A better trick is clearing the old content with xmlNodeSetContent(node, NULL) first and then calling xmlNodeAddContent(node, content). Unlike this function, xmlNodeAddContent accepts raw text.

`cur`: | the node being modified
`content`: | the new value of the content
`Returns`: | 0 on success, 1 on error, -1 if a memory allocation failed.

### xmlNodeSetContentLen ()

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

See xmlNodeSetContent.

`cur`: | the node being modified
`content`: | the new value of the content
`len`: | the size of @content
`Returns`: | 0 on success, 1 on error, -1 if a memory allocation failed.

### xmlNodeSetLang ()

    int	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 language description
`Returns`: | 0 on success, 1 if arguments are invalid, -1 if a memory allocation failed.

### xmlNodeSetName ()

    void	xmlNodeSetName			(xmlNodePtr cur,
    					 const xmlChar * name)

Set (or reset) the name of a node.

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

### xmlNodeSetSpacePreserve ()

    int	xmlNodeSetSpacePreserve		(xmlNodePtr cur,
    					 int val)

Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.

`cur`: | the node being changed
`val`: | the xml:space value ("0": default, 1: "preserve")
`Returns`: | 0 on success, 1 if arguments are invalid, -1 if a memory allocation failed.

### xmlPreviousElementSibling ()

    xmlNodePtr	xmlPreviousElementSibling	(xmlNodePtr node)

Find the closest preceding sibling which is a element. Note that entity references are not expanded.

`node`: | the current node
`Returns`: | the sibling or NULL if no sibling was found.

### xmlReconciliateNs ()

    int	xmlReconciliateNs		(xmlDocPtr doc,
    					 xmlNodePtr tree)

This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.

`doc`: | the document
`tree`: | a node defining the subtree to reconciliate
`Returns`: | 0 on success or -1 in case of error.

### xmlRegisterNodeDefault ()

    xmlRegisterNodeFunc	xmlRegisterNodeDefault	(xmlRegisterNodeFunc func)

DEPRECATED: don't use Registers a callback for node creation

`func`: | function pointer to the new RegisterNodeFunc
`Returns`: | the old value of the registration function

### xmlRemoveProp ()

    int	xmlRemoveProp			(xmlAttrPtr cur)

Unlink and free an attribute including all children. Note this doesn't work for namespace declarations. The attribute must have a non-NULL parent pointer.

`cur`: | an attribute
`Returns`: | 0 on success or -1 if the attribute was not found or arguments are invalid.

### xmlReplaceNode ()

    xmlNodePtr	xmlReplaceNode		(xmlNodePtr old,
    					 xmlNodePtr cur)

Unlink the old node. If @cur is provided, it is unlinked and inserted in place of @old. It is an error if @old has no parent. Unlike xmlAddChild, this function doesn't merge text nodes or delete duplicate attributes. See the notes in xmlAddChild.

`old`: | the old node
`cur`: | the node (optional)
`Returns`: | @old or NULL if arguments are invalid or a memory allocation failed.

### 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 (or URL)
`cur`: | the document
`Returns`: | the number of bytes written or -1 in case of failure.

### xmlSaveFileEnc ()

    int	xmlSaveFileEnc			(const char * filename,
    					 xmlDocPtr cur,
    					 const char * encoding)

Dump an XML document, converting it to the given encoding

`filename`: | the filename (or URL)
`cur`: | the document
`encoding`: | the name of an encoding (or NULL)
`Returns`: | the number of bytes written or -1 in case of failure.

### xmlSaveFileTo ()

    int	xmlSaveFileTo			(xmlOutputBufferPtr buf,
    					 xmlDocPtr cur,
    					 const char * encoding)

Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.

`buf`: | an output I/O buffer
`cur`: | the document
`encoding`: | the encoding if any assuming the I/O layer handles the transcoding
`Returns`: | the number of bytes written or -1 in case of failure.

### xmlSaveFormatFile ()

    int	xmlSaveFormatFile		(const char * filename,
    					 xmlDocPtr cur,
    					 int format)

Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

`filename`: | the filename (or URL)
`cur`: | the document
`format`: | should formatting spaces been added
`Returns`: | the number of bytes written or -1 in case of failure.

### xmlSaveFormatFileEnc ()

    int	xmlSaveFormatFileEnc		(const char * filename,
    					 xmlDocPtr cur,
    					 const char * encoding,
    					 int format)

Dump an XML document to a file or an URL.

`filename`: | the filename or URL to output
`cur`: | the document being saved
`encoding`: | the name of the encoding to use or NULL.
`format`: | should formatting spaces be added.
`Returns`: | the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called

### xmlSaveFormatFileTo ()

    int	xmlSaveFormatFileTo		(xmlOutputBufferPtr buf,
    					 xmlDocPtr cur,
    					 const char * encoding,
    					 int format)

Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.

`buf`: | an output I/O buffer
`cur`: | the document
`encoding`: | the encoding if any assuming the I/O layer handles the transcoding
`format`: | should formatting spaces been added
`Returns`: | the number of bytes written or -1 in case of failure.

### 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. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.

`doc`: | the document
`node`: | the current node
`nameSpace`: | the namespace prefix
`Returns`: | the namespace pointer or NULL if no namespace was found or a memory allocation failed. Allocations can only fail if the "xml" namespace is queried.

### 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 if no namespace was found or a memory allocation failed. Allocations can only fail if the "xml" namespace is queried.

### xmlSetBufferAllocationScheme ()

    void	xmlSetBufferAllocationScheme	(xmlBufferAllocationScheme scheme)

DEPRECATED: Use xmlBufferSetAllocationScheme. Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance

`scheme`: | allocation method to use

### xmlSetCompressMode ()

    void	xmlSetCompressMode		(int mode)

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

`mode`: | the compression ratio

### 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

### xmlSetListDoc ()

    int	xmlSetListDoc			(xmlNodePtr list,
    					 xmlDocPtr doc)

Associate all subtrees in @list with a new document. Internal function, see xmlSetTreeDoc.

`list`: | a node list
`doc`: | new document
`Returns`: | 0 on success. If a memory allocation fails, returns -1. All subtrees will be updated on failure but some strings may be lost.

### xmlSetNs ()

    void	xmlSetNs			(xmlNodePtr node,
    					 xmlNsPtr ns)

Set the namespace of an element or attribute node. Passing a NULL namespace unsets the namespace.

`node`: | a node in the document
`ns`: | a namespace pointer (optional)

### xmlSetNsProp ()

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

Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked

`node`: | the node
`ns`: | the namespace definition
`name`: | the attribute name
`value`: | the attribute value
`Returns`: | the attribute pointer.

### xmlSetProp ()

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

Set (or reset) an attribute carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.

`node`: | the node
`name`: | the attribute name (a QName)
`value`: | the attribute value
`Returns`: | the attribute pointer.

### xmlSetTreeDoc ()

    int	xmlSetTreeDoc			(xmlNodePtr tree,
    					 xmlDocPtr doc)

This is an internal function which shouldn't be used. It is invoked by functions like xmlAddChild, xmlAddSibling or xmlReplaceNode. @tree must be the root node of an unlinked subtree. Associate all nodes in a tree with a new document. Also copy strings from the old document's dictionary and remove ID attributes from the old ID table.

`tree`: | root of a subtree
`doc`: | new document
`Returns`: | 0 on success. If a memory allocation fails, returns -1. The whole tree will be updated on failure but some strings may be lost.

### xmlSplitQName2 ()

    xmlChar *	xmlSplitQName2		(const xmlChar * name,
    					 xmlChar ** prefix)

DEPRECATED: This function doesn't report malloc failures. parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName

`name`: | the full QName
`prefix`: | a xmlChar **
`Returns`: | NULL if the name doesn't have a prefix. Otherwise, returns the local part, and prefix is updated to get the Prefix. Both the return value and the prefix must be freed by the caller.

### xmlSplitQName3 ()

    const xmlChar *	xmlSplitQName3		(const xmlChar * name,
    					 int * len)

parse an XML qualified name string,i

`name`: | the full QName
`len`: | an int *
`Returns`: | NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix

### xmlStringGetNodeList ()

    xmlNodePtr	xmlStringGetNodeList	(const xmlDoc * doc,
    					 const xmlChar * value)

DEPRECATED: Use xmlNodeSetContent. Parse an attribute value and build a node list containing only text and entity reference nodes. The resulting nodes will be associated with the document if provided. The document is also used to look up entities. The input is not validated. Syntax errors or references to undeclared entities will be ignored silently with unspecified results.

`doc`: | a document (optional)
`value`: | an attribute value
`Returns`: | a pointer to the first child or NULL if the value if empty or a memory allocation failed.

### xmlStringLenGetNodeList ()

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

DEPRECATED: Use xmlNodeSetContentLen. See xmlStringGetNodeList.

`doc`: | a document (optional)
`value`: | an attribute value
`len`: | maximum length of the attribute value
`Returns`: | a pointer to the first child or NULL if the value if empty or a memory allocation failed.

### xmlTextConcat ()

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

Concat the given string at the end of the existing node content. If @len is -1, the string length will be calculated.

`node`: | the node
`content`: | the content
`len`: | @content length
`Returns`: | -1 in case of error, 0 otherwise

### xmlTextMerge ()

    xmlNodePtr	xmlTextMerge		(xmlNodePtr first,
    					 xmlNodePtr second)

Merge the second text node into the first. If @first is NULL, @second is returned. Otherwise, the second node is unlinked and freed.

`first`: | the first text node
`second`: | the second text node being merged
`Returns`: | the first text node augmented or NULL in case of error.

### xmlThrDefDeregisterNodeDefault ()

    xmlDeregisterNodeFunc	xmlThrDefDeregisterNodeDefault	(xmlDeregisterNodeFunc func)

`func`: |
`Returns`: |

### xmlThrDefRegisterNodeDefault ()

    xmlRegisterNodeFunc	xmlThrDefRegisterNodeDefault	(xmlRegisterNodeFunc func)

`func`: |
`Returns`: |

### xmlUnlinkNode ()

    void	xmlUnlinkNode			(xmlNodePtr cur)

Unlink a node from its tree. The node is not freed. Unless it is reinserted, it must be managed manually and freed eventually by calling xmlFreeNode.

`cur`: | the node

### xmlUnsetNsProp ()

    int	xmlUnsetNsProp			(xmlNodePtr node,
    					 xmlNsPtr ns,
    					 const xmlChar * name)

Remove an attribute carried by a node.

`node`: | the node
`ns`: | the namespace definition
`name`: | the attribute name
`Returns`: | 0 if successful, -1 if not found

### xmlUnsetProp ()

    int	xmlUnsetProp			(xmlNodePtr node,
    					 const xmlChar * name)

Remove an attribute carried by a node. This handles only attributes in no namespace.

`node`: | the node
`name`: | the attribute name
`Returns`: | 0 if successful, -1 if not found

### xmlValidateNCName ()

    int	xmlValidateNCName		(const xmlChar * value,
    					 int space)

Check that a value conforms to the lexical space of NCName

`value`: | the value to check
`space`: | allow spaces in front and end of the string
`Returns`: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

### xmlValidateNMToken ()

    int	xmlValidateNMToken		(const xmlChar * value,
    					 int space)

Check that a value conforms to the lexical space of NMToken

`value`: | the value to check
`space`: | allow spaces in front and end of the string
`Returns`: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

### xmlValidateName ()

    int	xmlValidateName			(const xmlChar * value,
    					 int space)

Check that a value conforms to the lexical space of Name

`value`: | the value to check
`space`: | allow spaces in front and end of the string
`Returns`: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.

### xmlValidateQName ()

    int	xmlValidateQName		(const xmlChar * value,
    					 int space)

Check that a value conforms to the lexical space of QName

`value`: | the value to check
`space`: | allow spaces in front and end of the string
`Returns`: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.