1<html> 2<head> 3<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 4<title>tree: interfaces for tree manipulation</title> 5<meta name="generator" content="Libxml2 devhelp stylesheet"> 6<link rel="start" href="index.html" title="libxml2 Reference Manual"> 7<link rel="up" href="general.html" title="API"> 8<link rel="stylesheet" href="style.css" type="text/css"> 9<link rel="chapter" href="general.html" title="API"> 10</head> 11<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> 12<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"> 13<td><a accesskey="p" href="libxml2-threads.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td> 14<td><a accesskey="u" href="general.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td> 15<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td> 16<td><a accesskey="n" href="libxml2-uri.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td> 17<th width="100%" align="center">libxml2 Reference Manual</th> 18</tr></table> 19<h2><span class="refentrytitle">tree</span></h2> 20<p>tree - interfaces for tree manipulation</p> 21<p>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 </p> 22<p>Author(s): Daniel Veillard </p> 23<div class="refsynopsisdiv"> 24<h2>Synopsis</h2> 25<pre class="synopsis">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>; 26#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>; 27#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>; 28#define <a href="#XML_GET_LINE">XML_GET_LINE</a>; 29#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>; 30#define <a href="#XML_XML_ID">XML_XML_ID</a>; 31#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>; 32#define <a href="#xmlChildrenNode">xmlChildrenNode</a>; 33#define <a href="#xmlRootNode">xmlRootNode</a>; 34typedef struct _xmlAttr <a href="#xmlAttr">xmlAttr</a>; 35typedef <a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * <a href="#xmlAttrPtr">xmlAttrPtr</a>; 36typedef struct _xmlAttribute <a href="#xmlAttribute">xmlAttribute</a>; 37typedef enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a>; 38typedef <a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * <a href="#xmlAttributePtr">xmlAttributePtr</a>; 39typedef enum <a href="#xmlAttributeType">xmlAttributeType</a>; 40typedef struct _xmlBuf <a href="#xmlBuf">xmlBuf</a>; 41typedef <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * <a href="#xmlBufPtr">xmlBufPtr</a>; 42typedef struct _xmlBuffer <a href="#xmlBuffer">xmlBuffer</a>; 43typedef enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a>; 44typedef <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * <a href="#xmlBufferPtr">xmlBufferPtr</a>; 45typedef struct _xmlDOMWrapCtxt <a href="#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a>; 46typedef <a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * <a href="#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a>; 47typedef struct _xmlDoc <a href="#xmlDoc">xmlDoc</a>; 48typedef enum <a href="#xmlDocProperties">xmlDocProperties</a>; 49typedef <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * <a href="#xmlDocPtr">xmlDocPtr</a>; 50typedef struct _xmlDtd <a href="#xmlDtd">xmlDtd</a>; 51typedef <a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * <a href="#xmlDtdPtr">xmlDtdPtr</a>; 52typedef struct _xmlElement <a href="#xmlElement">xmlElement</a>; 53typedef struct _xmlElementContent <a href="#xmlElementContent">xmlElementContent</a>; 54typedef enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a>; 55typedef <a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * <a href="#xmlElementContentPtr">xmlElementContentPtr</a>; 56typedef enum <a href="#xmlElementContentType">xmlElementContentType</a>; 57typedef <a href="libxml2-tree.html#xmlElement">xmlElement</a> * <a href="#xmlElementPtr">xmlElementPtr</a>; 58typedef enum <a href="#xmlElementType">xmlElementType</a>; 59typedef enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a>; 60typedef struct _xmlEntity <a href="#xmlEntity">xmlEntity</a>; 61typedef <a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * <a href="#xmlEntityPtr">xmlEntityPtr</a>; 62typedef struct _xmlEnumeration <a href="#xmlEnumeration">xmlEnumeration</a>; 63typedef <a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * <a href="#xmlEnumerationPtr">xmlEnumerationPtr</a>; 64typedef struct _xmlID <a href="#xmlID">xmlID</a>; 65typedef <a href="libxml2-tree.html#xmlID">xmlID</a> * <a href="#xmlIDPtr">xmlIDPtr</a>; 66typedef struct _xmlNode <a href="#xmlNode">xmlNode</a>; 67typedef <a href="libxml2-tree.html#xmlNode">xmlNode</a> * <a href="#xmlNodePtr">xmlNodePtr</a>; 68typedef struct _xmlNotation <a href="#xmlNotation">xmlNotation</a>; 69typedef <a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * <a href="#xmlNotationPtr">xmlNotationPtr</a>; 70typedef struct _xmlNs <a href="#xmlNs">xmlNs</a>; 71typedef <a href="libxml2-tree.html#xmlNs">xmlNs</a> * <a href="#xmlNsPtr">xmlNsPtr</a>; 72typedef <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> <a href="#xmlNsType">xmlNsType</a>; 73typedef struct _xmlOutputBuffer <a href="#xmlOutputBuffer">xmlOutputBuffer</a>; 74typedef <a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * <a href="#xmlOutputBufferPtr">xmlOutputBufferPtr</a>; 75typedef struct _xmlParserCtxt <a href="#xmlParserCtxt">xmlParserCtxt</a>; 76typedef <a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * <a href="#xmlParserCtxtPtr">xmlParserCtxtPtr</a>; 77typedef struct _xmlParserInput <a href="#xmlParserInput">xmlParserInput</a>; 78typedef struct _xmlParserInputBuffer <a href="#xmlParserInputBuffer">xmlParserInputBuffer</a>; 79typedef <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * <a href="#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a>; 80typedef <a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * <a href="#xmlParserInputPtr">xmlParserInputPtr</a>; 81typedef struct _xmlRef <a href="#xmlRef">xmlRef</a>; 82typedef <a href="libxml2-tree.html#xmlRef">xmlRef</a> * <a href="#xmlRefPtr">xmlRefPtr</a>; 83typedef struct _xmlSAXHandler <a href="#xmlSAXHandler">xmlSAXHandler</a>; 84typedef <a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * <a href="#xmlSAXHandlerPtr">xmlSAXHandlerPtr</a>; 85typedef struct _xmlSAXLocator <a href="#xmlSAXLocator">xmlSAXLocator</a>; 86typedef <a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * <a href="#xmlSAXLocatorPtr">xmlSAXLocatorPtr</a>; 87<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChild">xmlAddChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 88<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddChildList">xmlAddChildList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 89<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddNextSibling">xmlAddNextSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> prev, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 90<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddPrevSibling">xmlAddPrevSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> next, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 91<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlAddSibling">xmlAddSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 92void <a href="#xmlAttrSerializeTxtContent">xmlAttrSerializeTxtContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string); 93<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufContent">xmlBufContent</a> (const <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * buf); 94<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufEnd">xmlBufEnd</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf); 95int <a href="#xmlBufGetNodeContent">xmlBufGetNodeContent</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 96size_t <a href="#xmlBufNodeDump">xmlBufNodeDump</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format); 97size_t <a href="#xmlBufShrink">xmlBufShrink</a> (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> size_t len); 98size_t <a href="#xmlBufUse">xmlBufUse</a> (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf); 99int <a href="#xmlBufferAdd">xmlBufferAdd</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br> int len); 100int <a href="#xmlBufferAddHead">xmlBufferAddHead</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br> int len); 101int <a href="#xmlBufferCCat">xmlBufferCCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const char * str); 102int <a href="#xmlBufferCat">xmlBufferCat</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str); 103const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferContent">xmlBufferContent</a> (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf); 104<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreate">xmlBufferCreate</a> (void); 105<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateSize">xmlBufferCreateSize</a> (size_t size); 106<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> <a href="#xmlBufferCreateStatic">xmlBufferCreateStatic</a> (void * mem, <br> size_t size); 107<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBufferDetach">xmlBufferDetach</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf); 108int <a href="#xmlBufferDump">xmlBufferDump</a> (FILE * file, <br> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf); 109void <a href="#xmlBufferEmpty">xmlBufferEmpty</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf); 110void <a href="#xmlBufferFree">xmlBufferFree</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf); 111int <a href="#xmlBufferGrow">xmlBufferGrow</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int len); 112int <a href="#xmlBufferLength">xmlBufferLength</a> (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf); 113int <a href="#xmlBufferResize">xmlBufferResize</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int size); 114void <a href="#xmlBufferSetAllocationScheme">xmlBufferSetAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme); 115int <a href="#xmlBufferShrink">xmlBufferShrink</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int len); 116void <a href="#xmlBufferWriteCHAR">xmlBufferWriteCHAR</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string); 117void <a href="#xmlBufferWriteChar">xmlBufferWriteChar</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const char * string); 118void <a href="#xmlBufferWriteQuotedString">xmlBufferWriteQuotedString</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string); 119<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlBuildQName">xmlBuildQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br> int len); 120unsigned long <a href="#xmlChildElementCount">xmlChildElementCount</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent); 121<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlCopyDoc">xmlCopyDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int recursive); 122<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCopyDtd">xmlCopyDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd); 123<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespace">xmlCopyNamespace</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur); 124<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlCopyNamespaceList">xmlCopyNamespaceList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur); 125<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNode">xmlCopyNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> int extended); 126<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlCopyNodeList">xmlCopyNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 127<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyProp">xmlCopyProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur); 128<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlCopyPropList">xmlCopyPropList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur); 129<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlCreateIntSubset">xmlCreateIntSubset</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID); 130typedef <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix); 131int <a href="#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br> int options); 132int <a href="#xmlDOMWrapCloneNode">xmlDOMWrapCloneNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br> int deep, <br> int options); 133void <a href="#xmlDOMWrapFreeCtxt">xmlDOMWrapFreeCtxt</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt); 134<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> <a href="#xmlDOMWrapNewCtxt">xmlDOMWrapNewCtxt</a> (void); 135int <a href="#xmlDOMWrapReconcileNamespaces">xmlDOMWrapReconcileNamespaces</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br> int options); 136int <a href="#xmlDOMWrapRemoveNode">xmlDOMWrapRemoveNode</a> (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> int options); 137<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlDeregisterNodeDefault">xmlDeregisterNodeDefault</a> (<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func); 138typedef void <a href="#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 139<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNode">xmlDocCopyNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int extended); 140<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocCopyNodeList">xmlDocCopyNodeList</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 141int <a href="#xmlDocDump">xmlDocDump</a> (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur); 142void <a href="#xmlDocDumpFormatMemory">xmlDocDumpFormatMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br> int * size, <br> int format); 143void <a href="#xmlDocDumpFormatMemoryEnc">xmlDocDumpFormatMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br> int * doc_txt_len, <br> const char * txt_encoding, <br> int format); 144void <a href="#xmlDocDumpMemory">xmlDocDumpMemory</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br> int * size); 145void <a href="#xmlDocDumpMemoryEnc">xmlDocDumpMemoryEnc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br> int * doc_txt_len, <br> const char * txt_encoding); 146int <a href="#xmlDocFormatDump">xmlDocFormatDump</a> (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> int format); 147<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocGetRootElement">xmlDocGetRootElement</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc); 148<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlDocSetRootElement">xmlDocSetRootElement</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root); 149void <a href="#xmlElemDump">xmlElemDump</a> (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 150<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlFirstElementChild">xmlFirstElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent); 151void <a href="#xmlFreeDoc">xmlFreeDoc</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur); 152void <a href="#xmlFreeDtd">xmlFreeDtd</a> (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur); 153void <a href="#xmlFreeNode">xmlFreeNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 154void <a href="#xmlFreeNodeList">xmlFreeNodeList</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 155void <a href="#xmlFreeNs">xmlFreeNs</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur); 156void <a href="#xmlFreeNsList">xmlFreeNsList</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur); 157void <a href="#xmlFreeProp">xmlFreeProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur); 158void <a href="#xmlFreePropList">xmlFreePropList</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur); 159<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlGetBufferAllocationScheme">xmlGetBufferAllocationScheme</a> (void); 160int <a href="#xmlGetCompressMode">xmlGetCompressMode</a> (void); 161int <a href="#xmlGetDocCompressMode">xmlGetDocCompressMode</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc); 162<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlGetIntSubset">xmlGetIntSubset</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc); 163<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlGetLastChild">xmlGetLastChild</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * parent); 164long <a href="#xmlGetLineNo">xmlGetLineNo</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node); 165<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNoNsProp">xmlGetNoNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 166<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNodePath">xmlGetNodePath</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node); 167<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * <a href="#xmlGetNsList">xmlGetNsList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node); 168int <a href="#xmlGetNsListSafe">xmlGetNsListSafe</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ** out); 169<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetNsProp">xmlGetNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace); 170<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlGetProp">xmlGetProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 171<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasNsProp">xmlHasNsProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace); 172<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlHasProp">xmlHasProp</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 173int <a href="#xmlIsBlankNode">xmlIsBlankNode</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node); 174int <a href="#xmlIsXHTML">xmlIsXHTML</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID); 175<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlLastElementChild">xmlLastElementChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent); 176<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCDataBlock">xmlNewCDataBlock</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 177<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewCharRef">xmlNewCharRef</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 178<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewChild">xmlNewChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 179<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewComment">xmlNewComment</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 180<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> <a href="#xmlNewDoc">xmlNewDoc</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version); 181<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocComment">xmlNewDocComment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 182<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocFragment">xmlNewDocFragment</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 183<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNode">xmlNewDocNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 184<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 185<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocPI">xmlNewDocPI</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 186<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewDocProp">xmlNewDocProp</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 187<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocRawNode">xmlNewDocRawNode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 188<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocText">xmlNewDocText</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 189<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewDocTextLen">xmlNewDocTextLen</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 190<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> <a href="#xmlNewDtd">xmlNewDtd</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID); 191<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewGlobalNs">xmlNewGlobalNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix); 192<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNode">xmlNewNode</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 193<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewNodeEatName">xmlNewNodeEatName</a> (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 194<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlNewNs">xmlNewNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix); 195<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsProp">xmlNewNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 196<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewNsPropEatName">xmlNewNsPropEatName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 197<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewPI">xmlNewPI</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 198<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlNewProp">xmlNewProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 199<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewReference">xmlNewReference</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 200<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewText">xmlNewText</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 201<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextChild">xmlNewTextChild</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 202<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNewTextLen">xmlNewTextLen</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 203<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlNextElementSibling">xmlNextElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 204int <a href="#xmlNodeAddContent">xmlNodeAddContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 205int <a href="#xmlNodeAddContentLen">xmlNodeAddContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 206int <a href="#xmlNodeBufGetContent">xmlNodeBufGetContent</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 207int <a href="#xmlNodeDump">xmlNodeDump</a> (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format); 208void <a href="#xmlNodeDumpOutput">xmlNodeDumpOutput</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format, <br> const char * encoding); 209int <a href="#xmlNodeGetAttrValue">xmlNodeGetAttrValue</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsUri, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** out); 210<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetBase">xmlNodeGetBase</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 211int <a href="#xmlNodeGetBaseSafe">xmlNodeGetBaseSafe</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** baseOut); 212<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetContent">xmlNodeGetContent</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 213<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeGetLang">xmlNodeGetLang</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 214int <a href="#xmlNodeGetSpacePreserve">xmlNodeGetSpacePreserve</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur); 215int <a href="#xmlNodeIsText">xmlNodeIsText</a> (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node); 216<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetRawString">xmlNodeListGetRawString</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br> int inLine); 217<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlNodeListGetString">xmlNodeListGetString</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br> int inLine); 218int <a href="#xmlNodeSetBase">xmlNodeSetBase</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri); 219int <a href="#xmlNodeSetContent">xmlNodeSetContent</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content); 220int <a href="#xmlNodeSetContentLen">xmlNodeSetContentLen</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 221int <a href="#xmlNodeSetLang">xmlNodeSetLang</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang); 222void <a href="#xmlNodeSetName">xmlNodeSetName</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 223int <a href="#xmlNodeSetSpacePreserve">xmlNodeSetSpacePreserve</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int val); 224<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlPreviousElementSibling">xmlPreviousElementSibling</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 225int <a href="#xmlReconciliateNs">xmlReconciliateNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree); 226<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlRegisterNodeDefault">xmlRegisterNodeDefault</a> (<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func); 227typedef void <a href="#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node); 228int <a href="#xmlRemoveProp">xmlRemoveProp</a> (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur); 229<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlReplaceNode">xmlReplaceNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 230int <a href="#xmlSaveFile">xmlSaveFile</a> (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur); 231int <a href="#xmlSaveFileEnc">xmlSaveFileEnc</a> (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding); 232int <a href="#xmlSaveFileTo">xmlSaveFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding); 233int <a href="#xmlSaveFormatFile">xmlSaveFormatFile</a> (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> int format); 234int <a href="#xmlSaveFormatFileEnc">xmlSaveFormatFileEnc</a> (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding, <br> int format); 235int <a href="#xmlSaveFormatFileTo">xmlSaveFormatFileTo</a> (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding, <br> int format); 236<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNs">xmlSearchNs</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace); 237<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> <a href="#xmlSearchNsByHref">xmlSearchNsByHref</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href); 238void <a href="#xmlSetBufferAllocationScheme">xmlSetBufferAllocationScheme</a> (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme); 239void <a href="#xmlSetCompressMode">xmlSetCompressMode</a> (int mode); 240void <a href="#xmlSetDocCompressMode">xmlSetDocCompressMode</a> (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int mode); 241int <a href="#xmlSetListDoc">xmlSetListDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 242void <a href="#xmlSetNs">xmlSetNs</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns); 243<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetNsProp">xmlSetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 244<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> <a href="#xmlSetProp">xmlSetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 245int <a href="#xmlSetTreeDoc">xmlSetTreeDoc</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc); 246<a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName2">xmlSplitQName2</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix); 247const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * <a href="#xmlSplitQName3">xmlSplitQName3</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> int * len); 248<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringGetNodeList">xmlStringGetNodeList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value); 249<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlStringLenGetNodeList">xmlStringLenGetNodeList</a> (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int len); 250int <a href="#xmlTextConcat">xmlTextConcat</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len); 251<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> <a href="#xmlTextMerge">xmlTextMerge</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second); 252<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> <a href="#xmlThrDefBufferAllocScheme">xmlThrDefBufferAllocScheme</a> (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v); 253int <a href="#xmlThrDefDefaultBufferSize">xmlThrDefDefaultBufferSize</a> (int v); 254<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> <a href="#xmlThrDefDeregisterNodeDefault">xmlThrDefDeregisterNodeDefault</a> (<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func); 255<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> <a href="#xmlThrDefRegisterNodeDefault">xmlThrDefRegisterNodeDefault</a> (<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func); 256void <a href="#xmlUnlinkNode">xmlUnlinkNode</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur); 257int <a href="#xmlUnsetNsProp">xmlUnsetNsProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 258int <a href="#xmlUnsetProp">xmlUnsetProp</a> (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name); 259int <a href="#xmlValidateNCName">xmlValidateNCName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space); 260int <a href="#xmlValidateNMToken">xmlValidateNMToken</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space); 261int <a href="#xmlValidateName">xmlValidateName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space); 262int <a href="#xmlValidateQName">xmlValidateQName</a> (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space); 263</pre> 264</div> 265<div class="refsect1" lang="en"><h2>Description</h2></div> 266<div class="refsect1" lang="en"> 267<h2>Details</h2> 268<div class="refsect2" lang="en"> 269<div class="refsect2" lang="en"> 270<h3> 271<a name="BASE_BUFFER_SIZE">Macro </a>BASE_BUFFER_SIZE</h3> 272<pre class="programlisting">#define <a href="#BASE_BUFFER_SIZE">BASE_BUFFER_SIZE</a>; 273</pre> 274<p>default buffer size 4000.</p> 275</div> 276<hr> 277<div class="refsect2" lang="en"> 278<h3> 279<a name="LIBXML2_NEW_BUFFER">Macro </a>LIBXML2_NEW_BUFFER</h3> 280<pre class="programlisting">#define <a href="#LIBXML2_NEW_BUFFER">LIBXML2_NEW_BUFFER</a>; 281</pre> 282<p>Macro used to express that the API use the new buffers for <a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> and <a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a>. The change was introduced in 2.9.0.</p> 283</div> 284<hr> 285<div class="refsect2" lang="en"> 286<h3> 287<a name="XML_GET_CONTENT">Macro </a>XML_GET_CONTENT</h3> 288<pre class="programlisting">#define <a href="#XML_GET_CONTENT">XML_GET_CONTENT</a>; 289</pre> 290<p>Macro to extract the content pointer of a node.</p> 291</div> 292<hr> 293<div class="refsect2" lang="en"> 294<h3> 295<a name="XML_GET_LINE">Macro </a>XML_GET_LINE</h3> 296<pre class="programlisting">#define <a href="#XML_GET_LINE">XML_GET_LINE</a>; 297</pre> 298<p>Macro to extract the line number of an element node.</p> 299</div> 300<hr> 301<div class="refsect2" lang="en"> 302<h3> 303<a name="XML_LOCAL_NAMESPACE">Macro </a>XML_LOCAL_NAMESPACE</h3> 304<pre class="programlisting">#define <a href="#XML_LOCAL_NAMESPACE">XML_LOCAL_NAMESPACE</a>; 305</pre> 306<p>A namespace declaration node.</p> 307</div> 308<hr> 309<div class="refsect2" lang="en"> 310<h3> 311<a name="XML_XML_ID">Macro </a>XML_XML_ID</h3> 312<pre class="programlisting">#define <a href="#XML_XML_ID">XML_XML_ID</a>; 313</pre> 314<p>This is the name for the special xml:id <a href="libxml2-SAX.html#attribute">attribute</a></p> 315</div> 316<hr> 317<div class="refsect2" lang="en"> 318<h3> 319<a name="XML_XML_NAMESPACE">Macro </a>XML_XML_NAMESPACE</h3> 320<pre class="programlisting">#define <a href="#XML_XML_NAMESPACE">XML_XML_NAMESPACE</a>; 321</pre> 322<p>This is the namespace for the special xml: prefix predefined in the XML Namespace specification.</p> 323</div> 324<hr> 325<div class="refsect2" lang="en"> 326<h3> 327<a name="xmlChildrenNode">Macro </a>xmlChildrenNode</h3> 328<pre class="programlisting">#define <a href="#xmlChildrenNode">xmlChildrenNode</a>; 329</pre> 330<p>Macro for compatibility naming layer with libxml1. Maps to "children."</p> 331</div> 332<hr> 333<div class="refsect2" lang="en"> 334<h3> 335<a name="xmlRootNode">Macro </a>xmlRootNode</h3> 336<pre class="programlisting">#define <a href="#xmlRootNode">xmlRootNode</a>; 337</pre> 338<p>Macro for compatibility naming layer with libxml1. Maps to "children".</p> 339</div> 340<hr> 341<div class="refsect2" lang="en"> 342<h3> 343<a name="xmlAttr">Structure </a>xmlAttr</h3> 344<pre class="programlisting">struct _xmlAttr { 345 void * _private : application data 346 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_NODE, must be second ! 347 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the property 348 struct _xmlNode * children : the value of the property 349 struct _xmlNode * last : NULL 350 struct _xmlNode * parent : child->parent link 351 struct _xmlAttr * next : next sibling link 352 struct _xmlAttr * prev : previous sibling link 353 struct _xmlDoc * doc : the containing document 354 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace 355 <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : the <a href="libxml2-SAX.html#attribute">attribute</a> type if validating 356 void * psvi : for type/PSVI information 357 struct _xmlID * id : the ID struct 358} xmlAttr; 359</pre> 360<p></p> 361</div> 362<hr> 363<div class="refsect2" lang="en"> 364<h3> 365<a name="xmlAttrPtr">Typedef </a>xmlAttrPtr</h3> 366<pre class="programlisting"><a href="libxml2-tree.html#xmlAttr">xmlAttr</a> * xmlAttrPtr; 367</pre> 368<p></p> 369</div> 370<hr> 371<div class="refsect2" lang="en"> 372<h3> 373<a name="xmlAttribute">Structure </a>xmlAttribute</h3> 374<pre class="programlisting">struct _xmlAttribute { 375 void * _private : application data 376 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ATTRIBUTE_DECL, must be second ! 377 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Attribute name 378 struct _xmlNode * children : NULL 379 struct _xmlNode * last : NULL 380 struct _xmlDtd * parent : -> DTD 381 struct _xmlNode * next : next sibling link 382 struct _xmlNode * prev : previous sibling link 383 struct _xmlDoc * doc : the containing document 384 struct _xmlAttribute * nexth : next in hash table 385 <a href="libxml2-tree.html#xmlAttributeType">xmlAttributeType</a> atype : The <a href="libxml2-SAX.html#attribute">attribute</a> type 386 <a href="libxml2-tree.html#xmlAttributeDefault">xmlAttributeDefault</a> def : the default 387 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * defaultValue : or the default value 388 <a href="libxml2-tree.html#xmlEnumerationPtr">xmlEnumerationPtr</a> tree : or the enumeration tree if any 389 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any 390 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * elem : Element holding the <a href="libxml2-SAX.html#attribute">attribute</a> 391} xmlAttribute; 392</pre> 393<p></p> 394</div> 395<hr> 396<div class="refsect2" lang="en"> 397<h3> 398<a name="xmlAttributeDefault">Enum </a>xmlAttributeDefault</h3> 399<pre class="programlisting">enum <a href="#xmlAttributeDefault">xmlAttributeDefault</a> { 400 <a name="XML_ATTRIBUTE_NONE">XML_ATTRIBUTE_NONE</a> = 1 401 <a name="XML_ATTRIBUTE_REQUIRED">XML_ATTRIBUTE_REQUIRED</a> = 2 402 <a name="XML_ATTRIBUTE_IMPLIED">XML_ATTRIBUTE_IMPLIED</a> = 3 403 <a name="XML_ATTRIBUTE_FIXED">XML_ATTRIBUTE_FIXED</a> = 4 404}; 405</pre> 406<p></p> 407</div> 408<hr> 409<div class="refsect2" lang="en"> 410<h3> 411<a name="xmlAttributePtr">Typedef </a>xmlAttributePtr</h3> 412<pre class="programlisting"><a href="libxml2-tree.html#xmlAttribute">xmlAttribute</a> * xmlAttributePtr; 413</pre> 414<p></p> 415</div> 416<hr> 417<div class="refsect2" lang="en"> 418<h3> 419<a name="xmlAttributeType">Enum </a>xmlAttributeType</h3> 420<pre class="programlisting">enum <a href="#xmlAttributeType">xmlAttributeType</a> { 421 <a name="XML_ATTRIBUTE_CDATA">XML_ATTRIBUTE_CDATA</a> = 1 422 <a name="XML_ATTRIBUTE_ID">XML_ATTRIBUTE_ID</a> = 2 423 <a name="XML_ATTRIBUTE_IDREF">XML_ATTRIBUTE_IDREF</a> = 3 424 <a name="XML_ATTRIBUTE_IDREFS">XML_ATTRIBUTE_IDREFS</a> = 4 425 <a name="XML_ATTRIBUTE_ENTITY">XML_ATTRIBUTE_ENTITY</a> = 5 426 <a name="XML_ATTRIBUTE_ENTITIES">XML_ATTRIBUTE_ENTITIES</a> = 6 427 <a name="XML_ATTRIBUTE_NMTOKEN">XML_ATTRIBUTE_NMTOKEN</a> = 7 428 <a name="XML_ATTRIBUTE_NMTOKENS">XML_ATTRIBUTE_NMTOKENS</a> = 8 429 <a name="XML_ATTRIBUTE_ENUMERATION">XML_ATTRIBUTE_ENUMERATION</a> = 9 430 <a name="XML_ATTRIBUTE_NOTATION">XML_ATTRIBUTE_NOTATION</a> = 10 431}; 432</pre> 433<p></p> 434</div> 435<hr> 436<div class="refsect2" lang="en"> 437<h3> 438<a name="xmlBuf">Structure </a>xmlBuf</h3> 439<pre class="programlisting">struct _xmlBuf { 440The content of this structure is not made public by the API. 441} xmlBuf; 442</pre> 443<p></p> 444</div> 445<hr> 446<div class="refsect2" lang="en"> 447<h3> 448<a name="xmlBufPtr">Typedef </a>xmlBufPtr</h3> 449<pre class="programlisting"><a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * xmlBufPtr; 450</pre> 451<p>A pointer to a buffer structure, the actual structure internals are not public</p> 452</div> 453<hr> 454<div class="refsect2" lang="en"> 455<h3> 456<a name="xmlBuffer">Structure </a>xmlBuffer</h3> 457<pre class="programlisting">struct _xmlBuffer { 458 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : The buffer content UTF8 459 unsigned int use : The buffer size used 460 unsigned int size : The buffer size 461 <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> alloc : The realloc method 462 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * contentIO : in IO mode we may have a different base 463} xmlBuffer; 464</pre> 465<p></p> 466</div> 467<hr> 468<div class="refsect2" lang="en"> 469<h3> 470<a name="xmlBufferAllocationScheme">Enum </a>xmlBufferAllocationScheme</h3> 471<pre class="programlisting">enum <a href="#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> { 472 <a name="XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> = 1 /* double each time one need to grow */ 473 <a name="XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> = 2 /* grow only to the minimal size */ 474 <a name="XML_BUFFER_ALLOC_IMMUTABLE">XML_BUFFER_ALLOC_IMMUTABLE</a> = 3 /* immutable buffer, deprecated */ 475 <a name="XML_BUFFER_ALLOC_IO">XML_BUFFER_ALLOC_IO</a> = 4 /* special allocation scheme used for I/O */ 476 <a name="XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> = 5 /* exact up to a threshold, and doubleit thereafter */ 477 <a name="XML_BUFFER_ALLOC_BOUNDED">XML_BUFFER_ALLOC_BOUNDED</a> = 6 /* limit the upper size of the buffer */ 478}; 479</pre> 480<p></p> 481</div> 482<hr> 483<div class="refsect2" lang="en"> 484<h3> 485<a name="xmlBufferPtr">Typedef </a>xmlBufferPtr</h3> 486<pre class="programlisting"><a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * xmlBufferPtr; 487</pre> 488<p></p> 489</div> 490<hr> 491<div class="refsect2" lang="en"> 492<h3> 493<a name="xmlDOMWrapCtxt">Structure </a>xmlDOMWrapCtxt</h3> 494<pre class="programlisting">struct _xmlDOMWrapCtxt { 495 void * _private : * The type of this context, just in case we need specialized * context 496 int type : * Internal namespace map used for various operations. * 497 void * namespaceMap : * Use this one to acquire an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> intended for node->ns. * (Note t 498 <a href="libxml2-tree.html#xmlDOMWrapAcquireNsFunction">xmlDOMWrapAcquireNsFunction</a> getNsForNodeFunc 499} xmlDOMWrapCtxt; 500</pre> 501<p></p> 502</div> 503<hr> 504<div class="refsect2" lang="en"> 505<h3> 506<a name="xmlDOMWrapCtxtPtr">Typedef </a>xmlDOMWrapCtxtPtr</h3> 507<pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxt">xmlDOMWrapCtxt</a> * xmlDOMWrapCtxtPtr; 508</pre> 509<p></p> 510</div> 511<hr> 512<div class="refsect2" lang="en"> 513<h3> 514<a name="xmlDoc">Structure </a>xmlDoc</h3> 515<pre class="programlisting">struct _xmlDoc { 516 void * _private : application data 517 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DOCUMENT_NODE, must be second ! 518 char * name : name/filename/URI of the document 519 struct _xmlNode * children : the document tree 520 struct _xmlNode * last : last child link 521 struct _xmlNode * parent : child->parent link 522 struct _xmlNode * next : next sibling link 523 struct _xmlNode * prev : previous sibling link 524 struct _xmlDoc * doc : autoreference to itself End of common part 525 int compression : level of zlib compression 526 int standalone : standalone document (no external refs) 1 if standalone="yes" 0 if sta 527 struct _xmlDtd * intSubset : the document internal subset 528 struct _xmlDtd * extSubset : the document external subset 529 struct _xmlNs * oldNs : Global namespace, the old way 530 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string 531 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : actual encoding, if any 532 void * ids : Hash table for ID attributes if any 533 void * refs : Hash table for IDREFs attributes if any 534 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URL : The URI for that document 535 int charset : unused 536 struct _xmlDict * dict : dict used to allocate names or NULL 537 void * psvi : for type/PSVI information 538 int parseFlags : set of <a href="libxml2-parser.html#xmlParserOption">xmlParserOption</a> used to parse the document 539 int properties : set of <a href="libxml2-tree.html#xmlDocProperties">xmlDocProperties</a> for this document set at the end of parsing 540} xmlDoc; 541</pre> 542<p></p> 543</div> 544<hr> 545<div class="refsect2" lang="en"> 546<h3> 547<a name="xmlDocProperties">Enum </a>xmlDocProperties</h3> 548<pre class="programlisting">enum <a href="#xmlDocProperties">xmlDocProperties</a> { 549 <a name="XML_DOC_WELLFORMED">XML_DOC_WELLFORMED</a> = 1 /* document is XML well formed */ 550 <a name="XML_DOC_NSVALID">XML_DOC_NSVALID</a> = 2 /* document is Namespace valid */ 551 <a name="XML_DOC_OLD10">XML_DOC_OLD10</a> = 4 /* parsed with old XML-1.0 parser */ 552 <a name="XML_DOC_DTDVALID">XML_DOC_DTDVALID</a> = 8 /* DTD validation was successful */ 553 <a name="XML_DOC_XINCLUDE">XML_DOC_XINCLUDE</a> = 16 /* XInclude substitution was done */ 554 <a name="XML_DOC_USERBUILT">XML_DOC_USERBUILT</a> = 32 /* Document was built using the API and not by parsing an instance */ 555 <a name="XML_DOC_INTERNAL">XML_DOC_INTERNAL</a> = 64 /* built for internal processing */ 556 <a name="XML_DOC_HTML">XML_DOC_HTML</a> = 128 /* parsed or built HTML document */ 557}; 558</pre> 559<p></p> 560</div> 561<hr> 562<div class="refsect2" lang="en"> 563<h3> 564<a name="xmlDocPtr">Typedef </a>xmlDocPtr</h3> 565<pre class="programlisting"><a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * xmlDocPtr; 566</pre> 567<p></p> 568</div> 569<hr> 570<div class="refsect2" lang="en"> 571<h3> 572<a name="xmlDtd">Structure </a>xmlDtd</h3> 573<pre class="programlisting">struct _xmlDtd { 574 void * _private : application data 575 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_DTD_NODE, must be second ! 576 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Name of the DTD 577 struct _xmlNode * children : the value of the property link 578 struct _xmlNode * last : last child link 579 struct _xmlDoc * parent : child->parent link 580 struct _xmlNode * next : next sibling link 581 struct _xmlNode * prev : previous sibling link 582 struct _xmlDoc * doc : the containing document End of common part 583 void * notations : Hash table for notations if any 584 void * elements : Hash table for elements if any 585 void * attributes : Hash table for attributes if any 586 void * entities : Hash table for entities if any 587 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC DTD 588 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC DTD 589 void * pentities : Hash table for param entities if any 590} xmlDtd; 591</pre> 592<p></p> 593</div> 594<hr> 595<div class="refsect2" lang="en"> 596<h3> 597<a name="xmlDtdPtr">Typedef </a>xmlDtdPtr</h3> 598<pre class="programlisting"><a href="libxml2-tree.html#xmlDtd">xmlDtd</a> * xmlDtdPtr; 599</pre> 600<p></p> 601</div> 602<hr> 603<div class="refsect2" lang="en"> 604<h3> 605<a name="xmlElement">Structure </a>xmlElement</h3> 606<pre class="programlisting">struct _xmlElement { 607 void * _private : application data 608 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ELEMENT_DECL, must be second ! 609 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name 610 struct _xmlNode * children : NULL 611 struct _xmlNode * last : NULL 612 struct _xmlDtd * parent : -> DTD 613 struct _xmlNode * next : next sibling link 614 struct _xmlNode * prev : previous sibling link 615 struct _xmlDoc * doc : the containing document 616 <a href="libxml2-tree.html#xmlElementTypeVal">xmlElementTypeVal</a> etype : The type 617 <a href="libxml2-tree.html#xmlElementContentPtr">xmlElementContentPtr</a> content : the allowed element content 618 <a href="libxml2-tree.html#xmlAttributePtr">xmlAttributePtr</a> attributes : List of the declared attributes 619 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : the namespace prefix if any 620 <a href="libxml2-xmlregexp.html#xmlRegexpPtr">xmlRegexpPtr</a> contModel : the validating regexp 621 void * contModel 622} xmlElement; 623</pre> 624<p></p> 625</div> 626<hr> 627<div class="refsect2" lang="en"> 628<h3> 629<a name="xmlElementContent">Structure </a>xmlElementContent</h3> 630<pre class="programlisting">struct _xmlElementContent { 631 <a href="libxml2-tree.html#xmlElementContentType">xmlElementContentType</a> type : PCDATA, ELEMENT, SEQ or OR 632 <a href="libxml2-tree.html#xmlElementContentOccur">xmlElementContentOccur</a> ocur : ONCE, OPT, MULT or PLUS 633 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Element name 634 struct _xmlElementContent * c1 : first child 635 struct _xmlElementContent * c2 : second child 636 struct _xmlElementContent * parent : parent 637 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : Namespace prefix 638} xmlElementContent; 639</pre> 640<p></p> 641</div> 642<hr> 643<div class="refsect2" lang="en"> 644<h3> 645<a name="xmlElementContentOccur">Enum </a>xmlElementContentOccur</h3> 646<pre class="programlisting">enum <a href="#xmlElementContentOccur">xmlElementContentOccur</a> { 647 <a name="XML_ELEMENT_CONTENT_ONCE">XML_ELEMENT_CONTENT_ONCE</a> = 1 648 <a name="XML_ELEMENT_CONTENT_OPT">XML_ELEMENT_CONTENT_OPT</a> = 2 649 <a name="XML_ELEMENT_CONTENT_MULT">XML_ELEMENT_CONTENT_MULT</a> = 3 650 <a name="XML_ELEMENT_CONTENT_PLUS">XML_ELEMENT_CONTENT_PLUS</a> = 4 651}; 652</pre> 653<p></p> 654</div> 655<hr> 656<div class="refsect2" lang="en"> 657<h3> 658<a name="xmlElementContentPtr">Typedef </a>xmlElementContentPtr</h3> 659<pre class="programlisting"><a href="libxml2-tree.html#xmlElementContent">xmlElementContent</a> * xmlElementContentPtr; 660</pre> 661<p></p> 662</div> 663<hr> 664<div class="refsect2" lang="en"> 665<h3> 666<a name="xmlElementContentType">Enum </a>xmlElementContentType</h3> 667<pre class="programlisting">enum <a href="#xmlElementContentType">xmlElementContentType</a> { 668 <a name="XML_ELEMENT_CONTENT_PCDATA">XML_ELEMENT_CONTENT_PCDATA</a> = 1 669 <a name="XML_ELEMENT_CONTENT_ELEMENT">XML_ELEMENT_CONTENT_ELEMENT</a> = 2 670 <a name="XML_ELEMENT_CONTENT_SEQ">XML_ELEMENT_CONTENT_SEQ</a> = 3 671 <a name="XML_ELEMENT_CONTENT_OR">XML_ELEMENT_CONTENT_OR</a> = 4 672}; 673</pre> 674<p></p> 675</div> 676<hr> 677<div class="refsect2" lang="en"> 678<h3> 679<a name="xmlElementPtr">Typedef </a>xmlElementPtr</h3> 680<pre class="programlisting"><a href="libxml2-tree.html#xmlElement">xmlElement</a> * xmlElementPtr; 681</pre> 682<p></p> 683</div> 684<hr> 685<div class="refsect2" lang="en"> 686<h3> 687<a name="xmlElementType">Enum </a>xmlElementType</h3> 688<pre class="programlisting">enum <a href="#xmlElementType">xmlElementType</a> { 689 <a name="XML_ELEMENT_NODE">XML_ELEMENT_NODE</a> = 1 690 <a name="XML_ATTRIBUTE_NODE">XML_ATTRIBUTE_NODE</a> = 2 691 <a name="XML_TEXT_NODE">XML_TEXT_NODE</a> = 3 692 <a name="XML_CDATA_SECTION_NODE">XML_CDATA_SECTION_NODE</a> = 4 693 <a name="XML_ENTITY_REF_NODE">XML_ENTITY_REF_NODE</a> = 5 694 <a name="XML_ENTITY_NODE">XML_ENTITY_NODE</a> = 6 /* unused */ 695 <a name="XML_PI_NODE">XML_PI_NODE</a> = 7 696 <a name="XML_COMMENT_NODE">XML_COMMENT_NODE</a> = 8 697 <a name="XML_DOCUMENT_NODE">XML_DOCUMENT_NODE</a> = 9 698 <a name="XML_DOCUMENT_TYPE_NODE">XML_DOCUMENT_TYPE_NODE</a> = 10 /* unused */ 699 <a name="XML_DOCUMENT_FRAG_NODE">XML_DOCUMENT_FRAG_NODE</a> = 11 700 <a name="XML_NOTATION_NODE">XML_NOTATION_NODE</a> = 12 /* unused */ 701 <a name="XML_HTML_DOCUMENT_NODE">XML_HTML_DOCUMENT_NODE</a> = 13 702 <a name="XML_DTD_NODE">XML_DTD_NODE</a> = 14 703 <a name="XML_ELEMENT_DECL">XML_ELEMENT_DECL</a> = 15 704 <a name="XML_ATTRIBUTE_DECL">XML_ATTRIBUTE_DECL</a> = 16 705 <a name="XML_ENTITY_DECL">XML_ENTITY_DECL</a> = 17 706 <a name="XML_NAMESPACE_DECL">XML_NAMESPACE_DECL</a> = 18 707 <a name="XML_XINCLUDE_START">XML_XINCLUDE_START</a> = 19 708 <a name="XML_XINCLUDE_END">XML_XINCLUDE_END</a> = 20 /* XML_DOCB_DOCUMENT_NODE= 21 removed */ 709}; 710</pre> 711<p></p> 712</div> 713<hr> 714<div class="refsect2" lang="en"> 715<h3> 716<a name="xmlElementTypeVal">Enum </a>xmlElementTypeVal</h3> 717<pre class="programlisting">enum <a href="#xmlElementTypeVal">xmlElementTypeVal</a> { 718 <a name="XML_ELEMENT_TYPE_UNDEFINED">XML_ELEMENT_TYPE_UNDEFINED</a> = 0 719 <a name="XML_ELEMENT_TYPE_EMPTY">XML_ELEMENT_TYPE_EMPTY</a> = 1 720 <a name="XML_ELEMENT_TYPE_ANY">XML_ELEMENT_TYPE_ANY</a> = 2 721 <a name="XML_ELEMENT_TYPE_MIXED">XML_ELEMENT_TYPE_MIXED</a> = 3 722 <a name="XML_ELEMENT_TYPE_ELEMENT">XML_ELEMENT_TYPE_ELEMENT</a> = 4 723}; 724</pre> 725<p></p> 726</div> 727<hr> 728<div class="refsect2" lang="en"> 729<h3> 730<a name="xmlEntity">Structure </a>xmlEntity</h3> 731<pre class="programlisting">struct _xmlEntity { 732 void * _private : application data 733 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : XML_ENTITY_DECL, must be second ! 734 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Entity name 735 struct _xmlNode * children : First child link 736 struct _xmlNode * last : Last child link 737 struct _xmlDtd * parent : -> DTD 738 struct _xmlNode * next : next sibling link 739 struct _xmlNode * prev : previous sibling link 740 struct _xmlDoc * doc : the containing document 741 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * orig : content without ref substitution 742 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : content or ndata if unparsed 743 int length : the content length 744 <a href="libxml2-entities.html#xmlEntityType">xmlEntityType</a> etype : The entity type 745 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID : External identifier for PUBLIC 746 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : URI for a SYSTEM or PUBLIC Entity 747 struct _xmlEntity * nexte : unused 748 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * URI : the full URI as computed 749 int owner : unused 750 int flags : various flags 751 unsigned long expandedSize : expanded size 752} xmlEntity; 753</pre> 754<p></p> 755</div> 756<hr> 757<div class="refsect2" lang="en"> 758<h3> 759<a name="xmlEntityPtr">Typedef </a>xmlEntityPtr</h3> 760<pre class="programlisting"><a href="libxml2-tree.html#xmlEntity">xmlEntity</a> * xmlEntityPtr; 761</pre> 762<p></p> 763</div> 764<hr> 765<div class="refsect2" lang="en"> 766<h3> 767<a name="xmlEnumeration">Structure </a>xmlEnumeration</h3> 768<pre class="programlisting">struct _xmlEnumeration { 769 struct _xmlEnumeration * next : next one 770 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Enumeration name 771} xmlEnumeration; 772</pre> 773<p></p> 774</div> 775<hr> 776<div class="refsect2" lang="en"> 777<h3> 778<a name="xmlEnumerationPtr">Typedef </a>xmlEnumerationPtr</h3> 779<pre class="programlisting"><a href="libxml2-tree.html#xmlEnumeration">xmlEnumeration</a> * xmlEnumerationPtr; 780</pre> 781<p></p> 782</div> 783<hr> 784<div class="refsect2" lang="en"> 785<h3> 786<a name="xmlID">Structure </a>xmlID</h3> 787<pre class="programlisting">struct _xmlID { 788 struct _xmlID * next : next ID 789 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The ID name 790 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it 791 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available 792 int lineno : The line number if attr is not available 793 struct _xmlDoc * doc : The document holding the ID 794} xmlID; 795</pre> 796<p></p> 797</div> 798<hr> 799<div class="refsect2" lang="en"> 800<h3> 801<a name="xmlIDPtr">Typedef </a>xmlIDPtr</h3> 802<pre class="programlisting"><a href="libxml2-tree.html#xmlID">xmlID</a> * xmlIDPtr; 803</pre> 804<p></p> 805</div> 806<hr> 807<div class="refsect2" lang="en"> 808<h3> 809<a name="xmlNode">Structure </a>xmlNode</h3> 810<pre class="programlisting">struct _xmlNode { 811 void * _private : application data 812 <a href="libxml2-tree.html#xmlElementType">xmlElementType</a> type : type number, must be second ! 813 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : the name of the node, or the entity 814 struct _xmlNode * children : parent->childs link 815 struct _xmlNode * last : last child link 816 struct _xmlNode * parent : child->parent link 817 struct _xmlNode * next : next sibling link 818 struct _xmlNode * prev : previous sibling link 819 struct _xmlDoc * doc : the containing document End of common part 820 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * ns : pointer to the associated namespace 821 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content : the content 822 struct _xmlAttr * properties : properties list 823 <a href="libxml2-tree.html#xmlNs">xmlNs</a> * nsDef : namespace definitions on this node 824 void * psvi : for type/PSVI information 825 unsigned short line : line number 826 unsigned short extra : extra data for XPath/XSLT 827} xmlNode; 828</pre> 829<p></p> 830</div> 831<hr> 832<div class="refsect2" lang="en"> 833<h3> 834<a name="xmlNodePtr">Typedef </a>xmlNodePtr</h3> 835<pre class="programlisting"><a href="libxml2-tree.html#xmlNode">xmlNode</a> * xmlNodePtr; 836</pre> 837<p></p> 838</div> 839<hr> 840<div class="refsect2" lang="en"> 841<h3> 842<a name="xmlNotation">Structure </a>xmlNotation</h3> 843<pre class="programlisting">struct _xmlNotation { 844 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Notation name 845 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * PublicID : Public identifier, if any 846 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID : System identifier, if any 847} xmlNotation; 848</pre> 849<p></p> 850</div> 851<hr> 852<div class="refsect2" lang="en"> 853<h3> 854<a name="xmlNotationPtr">Typedef </a>xmlNotationPtr</h3> 855<pre class="programlisting"><a href="libxml2-tree.html#xmlNotation">xmlNotation</a> * xmlNotationPtr; 856</pre> 857<p></p> 858</div> 859<hr> 860<div class="refsect2" lang="en"> 861<h3> 862<a name="xmlNs">Structure </a>xmlNs</h3> 863<pre class="programlisting">struct _xmlNs { 864 struct _xmlNs * next : next Ns link for this node 865 <a href="libxml2-tree.html#xmlNsType">xmlNsType</a> type : global or local 866 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href : URL for the namespace 867 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix : prefix for the namespace 868 void * _private : application data 869 struct _xmlDoc * context : normally an <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> 870} xmlNs; 871</pre> 872<p></p> 873</div> 874<hr> 875<div class="refsect2" lang="en"> 876<h3> 877<a name="xmlNsPtr">Typedef </a>xmlNsPtr</h3> 878<pre class="programlisting"><a href="libxml2-tree.html#xmlNs">xmlNs</a> * xmlNsPtr; 879</pre> 880<p></p> 881</div> 882<hr> 883<div class="refsect2" lang="en"> 884<h3> 885<a name="xmlNsType">Typedef </a>xmlNsType</h3> 886<pre class="programlisting"><a href="libxml2-tree.html#xmlElementType">xmlElementType</a> xmlNsType; 887</pre> 888<p></p> 889</div> 890<hr> 891<div class="refsect2" lang="en"> 892<h3> 893<a name="xmlOutputBuffer">Structure </a>xmlOutputBuffer</h3> 894<pre class="programlisting">struct _xmlOutputBuffer { 895 void * context 896 <a href="libxml2-xmlIO.html#xmlOutputWriteCallback">xmlOutputWriteCallback</a> writecallback 897 <a href="libxml2-xmlIO.html#xmlOutputCloseCallback">xmlOutputCloseCallback</a> closecallback 898 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8 899 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8 or ISOLatin 900 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> conv : if encoder != NULL buffer for output 901 int written : total number of byte written 902 int error 903} xmlOutputBuffer; 904</pre> 905<p></p> 906</div> 907<hr> 908<div class="refsect2" lang="en"> 909<h3> 910<a name="xmlOutputBufferPtr">Typedef </a>xmlOutputBufferPtr</h3> 911<pre class="programlisting"><a href="libxml2-tree.html#xmlOutputBuffer">xmlOutputBuffer</a> * xmlOutputBufferPtr; 912</pre> 913<p></p> 914</div> 915<hr> 916<div class="refsect2" lang="en"> 917<h3> 918<a name="xmlParserCtxt">Structure </a>xmlParserCtxt</h3> 919<pre class="programlisting">struct _xmlParserCtxt { 920 struct _xmlSAXHandler * sax : The SAX handler 921 void * userData : For SAX interface only, used by DOM build 922 <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> myDoc : the document being built 923 int wellFormed : is the document well formed 924 int replaceEntities : shall we replace entities ? 925 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the XML version string 926 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : the declared encoding, if any 927 int standalone : standalone document 928 int html : an HTML(1) document * 3 is HTML after <head> * 10 is HTML after <body 929 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> input : Current input stream 930 int inputNr : Number of current input streams 931 int inputMax : Max number of input streams 932 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> * inputTab : stack of inputs Node analysis stack only used for DOM building 933 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node : Current parsed Node 934 int nodeNr : Depth of the parsing stack 935 int nodeMax : Max depth of the parsing stack 936 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * nodeTab : array of nodes 937 int record_info : Whether node info should be kept 938 <a href="libxml2-parser.html#xmlParserNodeInfoSeq">xmlParserNodeInfoSeq</a> node_seq : info about each node parsed 939 int errNo : error code 940 int hasExternalSubset : <a href="libxml2-SAX.html#reference">reference</a> and external subset 941 int hasPErefs : the internal subset has PE refs 942 int external : unused 943 int valid : is the document valid 944 int validate : shall we try to validate ? 945 <a href="libxml2-valid.html#xmlValidCtxt">xmlValidCtxt</a> vctxt : The validity context 946 <a href="libxml2-parser.html#xmlParserInputState">xmlParserInputState</a> instate : push parser state 947 int token : unused 948 char * directory : unused Node name stack 949 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : Current parsed Node 950 int nameNr : Depth of the parsing stack 951 int nameMax : Max depth of the parsing stack 952 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nameTab : array of nodes 953 long nbChars : unused 954 long checkIndex : used by progressive parsing lookup 955 int keepBlanks : ugly but ... 956 int disableSAX : SAX callbacks are disabled 957 int inSubset : Parsing is in int 1/ext 2 subset 958 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * intSubName : name of subset 959 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubURI : URI of external subset 960 <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * extSubSystem : SYSTEM ID of external subset xml:space values 961 int * space : Should the parser preserve spaces 962 int spaceNr : Depth of the parsing stack 963 int spaceMax : Max depth of the parsing stack 964 int * spaceTab : array of space infos 965 int depth : to prevent entity substitution loops 966 <a href="libxml2-tree.html#xmlParserInputPtr">xmlParserInputPtr</a> entity : unused 967 int charset : unused 968 int nodelen : Those two fields are there to 969 int nodemem : Speed up large node parsing 970 int pedantic : signal pedantic warnings 971 void * _private : For user data, libxml won't touch it 972 int loadsubset : should the external subset be loaded 973 int linenumbers : set line number in element content 974 void * catalogs : document's own catalog 975 int recovery : run in recovery mode 976 int progressive : unused 977 <a href="libxml2-dict.html#xmlDictPtr">xmlDictPtr</a> dict : dictionary for the parser 978 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * atts : array for the attributes callbacks 979 int maxatts : the size of the array 980 int docdict : * pre-interned strings * 981 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml 982 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xmlns 983 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str_xml_ns : * Everything below is used only by the new SAX mode * 984 int sax2 : operating in the new SAX mode 985 int nsNr : the number of inherited namespaces 986 int nsMax : the size of the arrays 987 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * * nsTab : the array of prefix/namespace name 988 unsigned * attallocs : which <a href="libxml2-SAX.html#attribute">attribute</a> were allocated 989 <a href="libxml2-parser.html#xmlStartTag">xmlStartTag</a> * pushTab : array of data for push 990 <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsDefault : defaulted attributes if any 991 <a href="libxml2-hash.html#xmlHashTablePtr">xmlHashTablePtr</a> attsSpecial : non-CDATA attributes if any 992 int nsWellFormed : is the document XML Namespace okay 993 int options : * Those fields are needed only for streaming parsing so far * 994 int dictNames : Use dictionary names for the tree 995 int freeElemsNr : number of freed element nodes 996 <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> freeElems : List of freed element nodes 997 int freeAttrsNr : number of freed attributes nodes 998 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> freeAttrs : * the complete error information for the last error. * 999 <a href="libxml2-xmlerror.html#xmlError">xmlError</a> lastError 1000 <a href="libxml2-parser.html#xmlParserMode">xmlParserMode</a> parseMode : the parser mode 1001 unsigned long nbentities : unused 1002 unsigned long sizeentities : size of external entities for use by HTML non-recursive parser 1003 <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfo : Current NodeInfo 1004 int nodeInfoNr : Depth of the parsing stack 1005 int nodeInfoMax : Max depth of the parsing stack 1006 <a href="libxml2-parser.html#xmlParserNodeInfo">xmlParserNodeInfo</a> * nodeInfoTab : array of nodeInfos 1007 int input_id : we need to label inputs 1008 unsigned long sizeentcopy : volume of entity copy 1009 int endCheckState : quote state for push parser 1010 unsigned short nbErrors : number of errors 1011 unsigned short nbWarnings : number of warnings 1012 unsigned maxAmpl : maximum amplification factor 1013 <a href="libxml2-parser.html#xmlParserNsData">xmlParserNsData</a> * nsdb : namespace database 1014 unsigned attrHashMax : allocated size 1015 <a href="libxml2-parser.html#xmlAttrHashBucket">xmlAttrHashBucket</a> * attrHash : atttribute hash table 1016 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> errorHandler 1017 void * errorCtxt 1018} xmlParserCtxt; 1019</pre> 1020<p></p> 1021</div> 1022<hr> 1023<div class="refsect2" lang="en"> 1024<h3> 1025<a name="xmlParserCtxtPtr">Typedef </a>xmlParserCtxtPtr</h3> 1026<pre class="programlisting"><a href="libxml2-tree.html#xmlParserCtxt">xmlParserCtxt</a> * xmlParserCtxtPtr; 1027</pre> 1028<p></p> 1029</div> 1030<hr> 1031<div class="refsect2" lang="en"> 1032<h3> 1033<a name="xmlParserInput">Structure </a>xmlParserInput</h3> 1034<pre class="programlisting">struct _xmlParserInput { 1035 <a href="libxml2-tree.html#xmlParserInputBufferPtr">xmlParserInputBufferPtr</a> buf : UTF-8 encoded buffer 1036 const char * filename : The file analyzed, if any 1037 const char * directory : unused 1038 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * base : Base of the array to parse 1039 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * cur : Current char being parsed 1040 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * end : end of the array to parse 1041 int length : unused 1042 int line : Current line 1043 int col : Current column 1044 unsigned long consumed : How many xmlChars already consumed 1045 <a href="libxml2-parser.html#xmlParserInputDeallocate">xmlParserInputDeallocate</a> free : function to deallocate the base 1046 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * encoding : unused 1047 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version : the version string for entity 1048 int flags : Flags 1049 int id : an unique identifier for the entity 1050 unsigned long parentConsumed : unused 1051 <a href="libxml2-tree.html#xmlEntityPtr">xmlEntityPtr</a> entity : entity, if any 1052} xmlParserInput; 1053</pre> 1054<p></p> 1055</div> 1056<hr> 1057<div class="refsect2" lang="en"> 1058<h3> 1059<a name="xmlParserInputBuffer">Structure </a>xmlParserInputBuffer</h3> 1060<pre class="programlisting">struct _xmlParserInputBuffer { 1061 void * context 1062 <a href="libxml2-xmlIO.html#xmlInputReadCallback">xmlInputReadCallback</a> readcallback 1063 <a href="libxml2-xmlIO.html#xmlInputCloseCallback">xmlInputCloseCallback</a> closecallback 1064 <a href="libxml2-encoding.html#xmlCharEncodingHandlerPtr">xmlCharEncodingHandlerPtr</a> encoder : I18N conversions to UTF-8 1065 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buffer : Local buffer encoded in UTF-8 1066 <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> raw : if encoder != NULL buffer for raw input 1067 int compressed : -1=unknown, 0=not compressed, 1=compressed 1068 int error 1069 unsigned long rawconsumed : amount consumed from raw 1070} xmlParserInputBuffer; 1071</pre> 1072<p></p> 1073</div> 1074<hr> 1075<div class="refsect2" lang="en"> 1076<h3> 1077<a name="xmlParserInputBufferPtr">Typedef </a>xmlParserInputBufferPtr</h3> 1078<pre class="programlisting"><a href="libxml2-tree.html#xmlParserInputBuffer">xmlParserInputBuffer</a> * xmlParserInputBufferPtr; 1079</pre> 1080<p></p> 1081</div> 1082<hr> 1083<div class="refsect2" lang="en"> 1084<h3> 1085<a name="xmlParserInputPtr">Typedef </a>xmlParserInputPtr</h3> 1086<pre class="programlisting"><a href="libxml2-tree.html#xmlParserInput">xmlParserInput</a> * xmlParserInputPtr; 1087</pre> 1088<p></p> 1089</div> 1090<hr> 1091<div class="refsect2" lang="en"> 1092<h3> 1093<a name="xmlRef">Structure </a>xmlRef</h3> 1094<pre class="programlisting">struct _xmlRef { 1095 struct _xmlRef * next : next Ref 1096 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value : The Ref name 1097 <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr : The <a href="libxml2-SAX.html#attribute">attribute</a> holding it 1098 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name : The <a href="libxml2-SAX.html#attribute">attribute</a> if attr is not available 1099 int lineno : The line number if attr is not available 1100} xmlRef; 1101</pre> 1102<p></p> 1103</div> 1104<hr> 1105<div class="refsect2" lang="en"> 1106<h3> 1107<a name="xmlRefPtr">Typedef </a>xmlRefPtr</h3> 1108<pre class="programlisting"><a href="libxml2-tree.html#xmlRef">xmlRef</a> * xmlRefPtr; 1109</pre> 1110<p></p> 1111</div> 1112<hr> 1113<div class="refsect2" lang="en"> 1114<h3> 1115<a name="xmlSAXHandler">Structure </a>xmlSAXHandler</h3> 1116<pre class="programlisting">struct _xmlSAXHandler { 1117 <a href="libxml2-parser.html#internalSubsetSAXFunc">internalSubsetSAXFunc</a> internalSubset 1118 <a href="libxml2-parser.html#isStandaloneSAXFunc">isStandaloneSAXFunc</a> isStandalone 1119 <a href="libxml2-parser.html#hasInternalSubsetSAXFunc">hasInternalSubsetSAXFunc</a> hasInternalSubset 1120 <a href="libxml2-parser.html#hasExternalSubsetSAXFunc">hasExternalSubsetSAXFunc</a> hasExternalSubset 1121 <a href="libxml2-parser.html#resolveEntitySAXFunc">resolveEntitySAXFunc</a> resolveEntity 1122 <a href="libxml2-parser.html#getEntitySAXFunc">getEntitySAXFunc</a> getEntity 1123 <a href="libxml2-parser.html#entityDeclSAXFunc">entityDeclSAXFunc</a> entityDecl 1124 <a href="libxml2-parser.html#notationDeclSAXFunc">notationDeclSAXFunc</a> notationDecl 1125 <a href="libxml2-parser.html#attributeDeclSAXFunc">attributeDeclSAXFunc</a> attributeDecl 1126 <a href="libxml2-parser.html#elementDeclSAXFunc">elementDeclSAXFunc</a> elementDecl 1127 <a href="libxml2-parser.html#unparsedEntityDeclSAXFunc">unparsedEntityDeclSAXFunc</a> unparsedEntityDecl 1128 <a href="libxml2-parser.html#setDocumentLocatorSAXFunc">setDocumentLocatorSAXFunc</a> setDocumentLocator 1129 <a href="libxml2-parser.html#startDocumentSAXFunc">startDocumentSAXFunc</a> startDocument 1130 <a href="libxml2-parser.html#endDocumentSAXFunc">endDocumentSAXFunc</a> endDocument : * `startElement` and `endElement` are only used by the legacy SAX1 * i 1131 <a href="libxml2-parser.html#startElementSAXFunc">startElementSAXFunc</a> startElement 1132 <a href="libxml2-parser.html#endElementSAXFunc">endElementSAXFunc</a> endElement 1133 <a href="libxml2-parser.html#referenceSAXFunc">referenceSAXFunc</a> reference 1134 <a href="libxml2-parser.html#charactersSAXFunc">charactersSAXFunc</a> characters 1135 <a href="libxml2-parser.html#ignorableWhitespaceSAXFunc">ignorableWhitespaceSAXFunc</a> ignorableWhitespace 1136 <a href="libxml2-parser.html#processingInstructionSAXFunc">processingInstructionSAXFunc</a> processingInstruction 1137 <a href="libxml2-parser.html#commentSAXFunc">commentSAXFunc</a> comment 1138 <a href="libxml2-parser.html#warningSAXFunc">warningSAXFunc</a> warning 1139 <a href="libxml2-parser.html#errorSAXFunc">errorSAXFunc</a> error 1140 <a href="libxml2-parser.html#fatalErrorSAXFunc">fatalErrorSAXFunc</a> fatalError : unused error() get all the errors 1141 <a href="libxml2-parser.html#getParameterEntitySAXFunc">getParameterEntitySAXFunc</a> getParameterEntity 1142 <a href="libxml2-parser.html#cdataBlockSAXFunc">cdataBlockSAXFunc</a> cdataBlock 1143 <a href="libxml2-parser.html#externalSubsetSAXFunc">externalSubsetSAXFunc</a> externalSubset : * `initialized` should always be set to <a href="libxml2-parser.html#XML_SAX2_MAGIC">XML_SAX2_MAGIC</a> to enable the * 1144 unsigned int initialized : * The following members are only used by the SAX2 interface. * 1145 void * _private 1146 <a href="libxml2-parser.html#startElementNsSAX2Func">startElementNsSAX2Func</a> startElementNs 1147 <a href="libxml2-parser.html#endElementNsSAX2Func">endElementNsSAX2Func</a> endElementNs 1148 <a href="libxml2-xmlerror.html#xmlStructuredErrorFunc">xmlStructuredErrorFunc</a> serror 1149} xmlSAXHandler; 1150</pre> 1151<p></p> 1152</div> 1153<hr> 1154<div class="refsect2" lang="en"> 1155<h3> 1156<a name="xmlSAXHandlerPtr">Typedef </a>xmlSAXHandlerPtr</h3> 1157<pre class="programlisting"><a href="libxml2-tree.html#xmlSAXHandler">xmlSAXHandler</a> * xmlSAXHandlerPtr; 1158</pre> 1159<p></p> 1160</div> 1161<hr> 1162<div class="refsect2" lang="en"> 1163<h3> 1164<a name="xmlSAXLocator">Structure </a>xmlSAXLocator</h3> 1165<pre class="programlisting">struct _xmlSAXLocator { 1166 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getPublicId) getPublicId 1167 const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> *(*getSystemId) getSystemId 1168 int(*getLineNumber) getLineNumber 1169 int(*getColumnNumber) getColumnNumber 1170} xmlSAXLocator; 1171</pre> 1172<p></p> 1173</div> 1174<hr> 1175<div class="refsect2" lang="en"> 1176<h3> 1177<a name="xmlSAXLocatorPtr">Typedef </a>xmlSAXLocatorPtr</h3> 1178<pre class="programlisting"><a href="libxml2-tree.html#xmlSAXLocator">xmlSAXLocator</a> * xmlSAXLocatorPtr; 1179</pre> 1180<p></p> 1181</div> 1182<hr> 1183<div class="refsect2" lang="en"> 1184<h3> 1185<a name="xmlDOMWrapAcquireNsFunction"></a>Function type xmlDOMWrapAcquireNsFunction</h3> 1186<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlDOMWrapAcquireNsFunction (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsName, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsPrefix)<br> 1187</pre> 1188<p>A function called to acquire namespaces (xmlNs) from the wrapper.</p> 1189<div class="variablelist"><table border="0"> 1190<col align="left"> 1191<tbody> 1192<tr> 1193<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 1194<td>a DOM wrapper context</td> 1195</tr> 1196<tr> 1197<td><span class="term"><i><tt>node</tt></i>:</span></td> 1198<td>the context node (element or attribute)</td> 1199</tr> 1200<tr> 1201<td><span class="term"><i><tt>nsName</tt></i>:</span></td> 1202<td>the requested namespace name</td> 1203</tr> 1204<tr> 1205<td><span class="term"><i><tt>nsPrefix</tt></i>:</span></td> 1206<td>the requested namespace prefix</td> 1207</tr> 1208<tr> 1209<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1210<td>an <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> or NULL in case of an error.</td> 1211</tr> 1212</tbody> 1213</table></div> 1214</div> 1215<hr> 1216<div class="refsect2" lang="en"> 1217<h3> 1218<a name="xmlDeregisterNodeFunc"></a>Function type xmlDeregisterNodeFunc</h3> 1219<pre class="programlisting">void xmlDeregisterNodeFunc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 1220</pre> 1221<p>Signature for the deregistration callback of a discarded node</p> 1222<div class="variablelist"><table border="0"> 1223<col align="left"> 1224<tbody><tr> 1225<td><span class="term"><i><tt>node</tt></i>:</span></td> 1226<td>the current node</td> 1227</tr></tbody> 1228</table></div> 1229</div> 1230<hr> 1231<div class="refsect2" lang="en"> 1232<h3> 1233<a name="xmlRegisterNodeFunc"></a>Function type xmlRegisterNodeFunc</h3> 1234<pre class="programlisting">void xmlRegisterNodeFunc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 1235</pre> 1236<p>Signature for the registration callback of a created node</p> 1237<div class="variablelist"><table border="0"> 1238<col align="left"> 1239<tbody><tr> 1240<td><span class="term"><i><tt>node</tt></i>:</span></td> 1241<td>the current node</td> 1242</tr></tbody> 1243</table></div> 1244</div> 1245<hr> 1246<div class="refsect2" lang="en"> 1247<h3> 1248<a name="xmlAddChild"></a>xmlAddChild ()</h3> 1249<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 1250</pre> 1251<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> node, it is appended to the attributes of @parent. If the <a href="libxml2-SAX.html#attribute">attribute</a> list contains an <a href="libxml2-SAX.html#attribute">attribute</a> with a name matching @elem, the old <a href="libxml2-SAX.html#attribute">attribute</a> is destroyed. General notes: Move operations like <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a> can cause element or <a href="libxml2-SAX.html#attribute">attribute</a> nodes to <a href="libxml2-SAX.html#reference">reference</a> 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 <a href="libxml2-tree.html#xmlReconciliateNs">xmlReconciliateNs</a> after a move operation to normalize namespaces. Another option is to call <a href="libxml2-tree.html#xmlDOMWrapAdoptNode">xmlDOMWrapAdoptNode</a> 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.</p> 1252<div class="variablelist"><table border="0"> 1253<col align="left"> 1254<tbody> 1255<tr> 1256<td><span class="term"><i><tt>parent</tt></i>:</span></td> 1257<td>the parent node</td> 1258</tr> 1259<tr> 1260<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1261<td>the child node</td> 1262</tr> 1263<tr> 1264<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1265<td>@elem or a sibling if @elem was merged. Returns NULL if arguments are invalid or a memory allocation failed.</td> 1266</tr> 1267</tbody> 1268</table></div> 1269</div> 1270<hr> 1271<div class="refsect2" lang="en"> 1272<h3> 1273<a name="xmlAddChildList"></a>xmlAddChildList ()</h3> 1274<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddChildList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 1275</pre> 1276<p>Append a node list to another node. See <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a>.</p> 1277<div class="variablelist"><table border="0"> 1278<col align="left"> 1279<tbody> 1280<tr> 1281<td><span class="term"><i><tt>parent</tt></i>:</span></td> 1282<td>the parent node</td> 1283</tr> 1284<tr> 1285<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1286<td>the first node in the list</td> 1287</tr> 1288<tr> 1289<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1290<td>the last child or NULL in case of error.</td> 1291</tr> 1292</tbody> 1293</table></div> 1294</div> 1295<hr> 1296<div class="refsect2" lang="en"> 1297<h3> 1298<a name="xmlAddNextSibling"></a>xmlAddNextSibling ()</h3> 1299<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddNextSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> prev, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 1300</pre> 1301<p>Unlinks @cur and inserts it as next sibling after @prev. Unlike <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a> this function does not merge text nodes. If @cur is an <a href="libxml2-SAX.html#attribute">attribute</a> node, it is inserted after <a href="libxml2-SAX.html#attribute">attribute</a> @prev. If the <a href="libxml2-SAX.html#attribute">attribute</a> list contains an <a href="libxml2-SAX.html#attribute">attribute</a> with a name matching @cur, the old <a href="libxml2-SAX.html#attribute">attribute</a> is destroyed. See the notes in <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a>.</p> 1302<div class="variablelist"><table border="0"> 1303<col align="left"> 1304<tbody> 1305<tr> 1306<td><span class="term"><i><tt>prev</tt></i>:</span></td> 1307<td>the target node</td> 1308</tr> 1309<tr> 1310<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1311<td>the new node</td> 1312</tr> 1313<tr> 1314<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1315<td>@cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.</td> 1316</tr> 1317</tbody> 1318</table></div> 1319</div> 1320<hr> 1321<div class="refsect2" lang="en"> 1322<h3> 1323<a name="xmlAddPrevSibling"></a>xmlAddPrevSibling ()</h3> 1324<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddPrevSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> next, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 1325</pre> 1326<p>Unlinks @cur and inserts it as previous sibling before @next. Unlike <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a> this function does not merge text nodes. If @cur is an <a href="libxml2-SAX.html#attribute">attribute</a> node, it is inserted before <a href="libxml2-SAX.html#attribute">attribute</a> @next. If the <a href="libxml2-SAX.html#attribute">attribute</a> list contains an <a href="libxml2-SAX.html#attribute">attribute</a> with a name matching @cur, the old <a href="libxml2-SAX.html#attribute">attribute</a> is destroyed. See the notes in <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a>.</p> 1327<div class="variablelist"><table border="0"> 1328<col align="left"> 1329<tbody> 1330<tr> 1331<td><span class="term"><i><tt>next</tt></i>:</span></td> 1332<td>the target node</td> 1333</tr> 1334<tr> 1335<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1336<td>the new node</td> 1337</tr> 1338<tr> 1339<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1340<td>@cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.</td> 1341</tr> 1342</tbody> 1343</table></div> 1344</div> 1345<hr> 1346<div class="refsect2" lang="en"> 1347<h3> 1348<a name="xmlAddSibling"></a>xmlAddSibling ()</h3> 1349<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlAddSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 1350</pre> 1351<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> node, it is appended to the <a href="libxml2-SAX.html#attribute">attribute</a> list containing @node. If the <a href="libxml2-SAX.html#attribute">attribute</a> list contains an <a href="libxml2-SAX.html#attribute">attribute</a> with a name matching @cur, the old <a href="libxml2-SAX.html#attribute">attribute</a> is destroyed. See the notes in <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a>.</p> 1352<div class="variablelist"><table border="0"> 1353<col align="left"> 1354<tbody> 1355<tr> 1356<td><span class="term"><i><tt>node</tt></i>:</span></td> 1357<td>the target node</td> 1358</tr> 1359<tr> 1360<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1361<td>the new node</td> 1362</tr> 1363<tr> 1364<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1365<td>@cur or a sibling if @cur was merged. Returns NULL if arguments are invalid or a memory allocation failed.</td> 1366</tr> 1367</tbody> 1368</table></div> 1369</div> 1370<hr> 1371<div class="refsect2" lang="en"> 1372<h3> 1373<a name="xmlAttrSerializeTxtContent"></a>xmlAttrSerializeTxtContent ()</h3> 1374<pre class="programlisting">void xmlAttrSerializeTxtContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> attr, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br> 1375</pre> 1376<p>Serialize text <a href="libxml2-SAX.html#attribute">attribute</a> values to an xml simple buffer</p> 1377<div class="variablelist"><table border="0"> 1378<col align="left"> 1379<tbody> 1380<tr> 1381<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1382<td>the XML buffer output</td> 1383</tr> 1384<tr> 1385<td><span class="term"><i><tt>doc</tt></i>:</span></td> 1386<td>the document</td> 1387</tr> 1388<tr> 1389<td><span class="term"><i><tt>attr</tt></i>:</span></td> 1390<td>the <a href="libxml2-SAX.html#attribute">attribute</a> node</td> 1391</tr> 1392<tr> 1393<td><span class="term"><i><tt>string</tt></i>:</span></td> 1394<td>the text content</td> 1395</tr> 1396</tbody> 1397</table></div> 1398</div> 1399<hr> 1400<div class="refsect2" lang="en"> 1401<h3> 1402<a name="xmlBufContent"></a>xmlBufContent ()</h3> 1403<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufContent (const <a href="libxml2-tree.html#xmlBuf">xmlBuf</a> * buf)<br> 1404</pre> 1405<p>Function to extract the content of a buffer</p> 1406<div class="variablelist"><table border="0"> 1407<col align="left"> 1408<tbody> 1409<tr> 1410<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1411<td>the buffer</td> 1412</tr> 1413<tr> 1414<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1415<td>the internal content</td> 1416</tr> 1417</tbody> 1418</table></div> 1419</div> 1420<hr> 1421<div class="refsect2" lang="en"> 1422<h3> 1423<a name="xmlBufEnd"></a>xmlBufEnd ()</h3> 1424<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufEnd (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br> 1425</pre> 1426<p>Function to extract the end of the content of a buffer</p> 1427<div class="variablelist"><table border="0"> 1428<col align="left"> 1429<tbody> 1430<tr> 1431<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1432<td>the buffer</td> 1433</tr> 1434<tr> 1435<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1436<td>the end of the internal content or NULL in case of error</td> 1437</tr> 1438</tbody> 1439</table></div> 1440</div> 1441<hr> 1442<div class="refsect2" lang="en"> 1443<h3> 1444<a name="xmlBufGetNodeContent"></a>xmlBufGetNodeContent ()</h3> 1445<pre class="programlisting">int xmlBufGetNodeContent (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 1446</pre> 1447<p>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</p> 1448<div class="variablelist"><table border="0"> 1449<col align="left"> 1450<tbody> 1451<tr> 1452<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1453<td>a buffer <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> 1454</td> 1455</tr> 1456<tr> 1457<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1458<td>the node being read</td> 1459</tr> 1460<tr> 1461<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1462<td>0 in case of success and -1 in case of error.</td> 1463</tr> 1464</tbody> 1465</table></div> 1466</div> 1467<hr> 1468<div class="refsect2" lang="en"> 1469<h3> 1470<a name="xmlBufNodeDump"></a>xmlBufNodeDump ()</h3> 1471<pre class="programlisting">size_t xmlBufNodeDump (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format)<br> 1472</pre> 1473<p>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</p> 1474<div class="variablelist"><table border="0"> 1475<col align="left"> 1476<tbody> 1477<tr> 1478<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1479<td>the XML buffer output</td> 1480</tr> 1481<tr> 1482<td><span class="term"><i><tt>doc</tt></i>:</span></td> 1483<td>the document</td> 1484</tr> 1485<tr> 1486<td><span class="term"><i><tt>cur</tt></i>:</span></td> 1487<td>the current node</td> 1488</tr> 1489<tr> 1490<td><span class="term"><i><tt>level</tt></i>:</span></td> 1491<td>the imbrication level for indenting</td> 1492</tr> 1493<tr> 1494<td><span class="term"><i><tt>format</tt></i>:</span></td> 1495<td>is formatting allowed</td> 1496</tr> 1497<tr> 1498<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1499<td>the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error</td> 1500</tr> 1501</tbody> 1502</table></div> 1503</div> 1504<hr> 1505<div class="refsect2" lang="en"> 1506<h3> 1507<a name="xmlBufShrink"></a>xmlBufShrink ()</h3> 1508<pre class="programlisting">size_t xmlBufShrink (<a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf, <br> size_t len)<br> 1509</pre> 1510<p>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.</p> 1511<div class="variablelist"><table border="0"> 1512<col align="left"> 1513<tbody> 1514<tr> 1515<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1516<td>the buffer to dump</td> 1517</tr> 1518<tr> 1519<td><span class="term"><i><tt>len</tt></i>:</span></td> 1520<td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td> 1521</tr> 1522<tr> 1523<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1524<td>the number of byte removed or 0 in case of failure</td> 1525</tr> 1526</tbody> 1527</table></div> 1528</div> 1529<hr> 1530<div class="refsect2" lang="en"> 1531<h3> 1532<a name="xmlBufUse"></a>xmlBufUse ()</h3> 1533<pre class="programlisting">size_t xmlBufUse (const <a href="libxml2-tree.html#xmlBufPtr">xmlBufPtr</a> buf)<br> 1534</pre> 1535<p>Function to get the length of a buffer</p> 1536<div class="variablelist"><table border="0"> 1537<col align="left"> 1538<tbody> 1539<tr> 1540<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1541<td>the buffer</td> 1542</tr> 1543<tr> 1544<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1545<td>the length of data in the internal content</td> 1546</tr> 1547</tbody> 1548</table></div> 1549</div> 1550<hr> 1551<div class="refsect2" lang="en"> 1552<h3> 1553<a name="xmlBufferAdd"></a>xmlBufferAdd ()</h3> 1554<pre class="programlisting">int xmlBufferAdd (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br> int len)<br> 1555</pre> 1556<p>Add a string range to an XML buffer. if len == -1, the length of str is recomputed.</p> 1557<div class="variablelist"><table border="0"> 1558<col align="left"> 1559<tbody> 1560<tr> 1561<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1562<td>the buffer to dump</td> 1563</tr> 1564<tr> 1565<td><span class="term"><i><tt>str</tt></i>:</span></td> 1566<td>the #xmlChar string</td> 1567</tr> 1568<tr> 1569<td><span class="term"><i><tt>len</tt></i>:</span></td> 1570<td>the number of #xmlChar to add</td> 1571</tr> 1572<tr> 1573<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1574<td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td> 1575</tr> 1576</tbody> 1577</table></div> 1578</div> 1579<hr> 1580<div class="refsect2" lang="en"> 1581<h3> 1582<a name="xmlBufferAddHead"></a>xmlBufferAddHead ()</h3> 1583<pre class="programlisting">int xmlBufferAddHead (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str, <br> int len)<br> 1584</pre> 1585<p>Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.</p> 1586<div class="variablelist"><table border="0"> 1587<col align="left"> 1588<tbody> 1589<tr> 1590<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1591<td>the buffer</td> 1592</tr> 1593<tr> 1594<td><span class="term"><i><tt>str</tt></i>:</span></td> 1595<td>the #xmlChar string</td> 1596</tr> 1597<tr> 1598<td><span class="term"><i><tt>len</tt></i>:</span></td> 1599<td>the number of #xmlChar to add</td> 1600</tr> 1601<tr> 1602<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1603<td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td> 1604</tr> 1605</tbody> 1606</table></div> 1607</div> 1608<hr> 1609<div class="refsect2" lang="en"> 1610<h3> 1611<a name="xmlBufferCCat"></a>xmlBufferCCat ()</h3> 1612<pre class="programlisting">int xmlBufferCCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const char * str)<br> 1613</pre> 1614<p>Append a zero terminated C string to an XML buffer.</p> 1615<div class="variablelist"><table border="0"> 1616<col align="left"> 1617<tbody> 1618<tr> 1619<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1620<td>the buffer to dump</td> 1621</tr> 1622<tr> 1623<td><span class="term"><i><tt>str</tt></i>:</span></td> 1624<td>the C char string</td> 1625</tr> 1626<tr> 1627<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1628<td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td> 1629</tr> 1630</tbody> 1631</table></div> 1632</div> 1633<hr> 1634<div class="refsect2" lang="en"> 1635<h3> 1636<a name="xmlBufferCat"></a>xmlBufferCat ()</h3> 1637<pre class="programlisting">int xmlBufferCat (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * str)<br> 1638</pre> 1639<p>Append a zero terminated string to an XML buffer.</p> 1640<div class="variablelist"><table border="0"> 1641<col align="left"> 1642<tbody> 1643<tr> 1644<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1645<td>the buffer to add to</td> 1646</tr> 1647<tr> 1648<td><span class="term"><i><tt>str</tt></i>:</span></td> 1649<td>the #xmlChar string</td> 1650</tr> 1651<tr> 1652<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1653<td>0 successful, a positive error code number otherwise and -1 in case of internal or API error.</td> 1654</tr> 1655</tbody> 1656</table></div> 1657</div> 1658<hr> 1659<div class="refsect2" lang="en"> 1660<h3> 1661<a name="xmlBufferContent"></a>xmlBufferContent ()</h3> 1662<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferContent (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br> 1663</pre> 1664<p>Function to extract the content of a buffer</p> 1665<div class="variablelist"><table border="0"> 1666<col align="left"> 1667<tbody> 1668<tr> 1669<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1670<td>the buffer</td> 1671</tr> 1672<tr> 1673<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1674<td>the internal content</td> 1675</tr> 1676</tbody> 1677</table></div> 1678</div> 1679<hr> 1680<div class="refsect2" lang="en"> 1681<h3> 1682<a name="xmlBufferCreate"></a>xmlBufferCreate ()</h3> 1683<pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreate (void)<br> 1684</pre> 1685<p>routine to create an XML buffer.</p> 1686<div class="variablelist"><table border="0"> 1687<col align="left"> 1688<tbody><tr> 1689<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1690<td>the new structure.</td> 1691</tr></tbody> 1692</table></div> 1693</div> 1694<hr> 1695<div class="refsect2" lang="en"> 1696<h3> 1697<a name="xmlBufferCreateSize"></a>xmlBufferCreateSize ()</h3> 1698<pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateSize (size_t size)<br> 1699</pre> 1700<p>routine to create an XML buffer.</p> 1701<div class="variablelist"><table border="0"> 1702<col align="left"> 1703<tbody> 1704<tr> 1705<td><span class="term"><i><tt>size</tt></i>:</span></td> 1706<td>initial size of buffer</td> 1707</tr> 1708<tr> 1709<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1710<td>the new structure.</td> 1711</tr> 1712</tbody> 1713</table></div> 1714</div> 1715<hr> 1716<div class="refsect2" lang="en"> 1717<h3> 1718<a name="xmlBufferCreateStatic"></a>xmlBufferCreateStatic ()</h3> 1719<pre class="programlisting"><a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> xmlBufferCreateStatic (void * mem, <br> size_t size)<br> 1720</pre> 1721<p></p> 1722<div class="variablelist"><table border="0"> 1723<col align="left"> 1724<tbody> 1725<tr> 1726<td><span class="term"><i><tt>mem</tt></i>:</span></td> 1727<td>the memory area</td> 1728</tr> 1729<tr> 1730<td><span class="term"><i><tt>size</tt></i>:</span></td> 1731<td>the size in byte</td> 1732</tr> 1733<tr> 1734<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1735<td>an XML buffer initialized with bytes.</td> 1736</tr> 1737</tbody> 1738</table></div> 1739</div> 1740<hr> 1741<div class="refsect2" lang="en"> 1742<h3> 1743<a name="xmlBufferDetach"></a>xmlBufferDetach ()</h3> 1744<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBufferDetach (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br> 1745</pre> 1746<p>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.</p> 1747<div class="variablelist"><table border="0"> 1748<col align="left"> 1749<tbody> 1750<tr> 1751<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1752<td>the buffer</td> 1753</tr> 1754<tr> 1755<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1756<td>the previous string contained by the buffer.</td> 1757</tr> 1758</tbody> 1759</table></div> 1760</div> 1761<hr> 1762<div class="refsect2" lang="en"> 1763<h3> 1764<a name="xmlBufferDump"></a>xmlBufferDump ()</h3> 1765<pre class="programlisting">int xmlBufferDump (FILE * file, <br> <a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br> 1766</pre> 1767<p>Dumps an XML buffer to a FILE *.</p> 1768<div class="variablelist"><table border="0"> 1769<col align="left"> 1770<tbody> 1771<tr> 1772<td><span class="term"><i><tt>file</tt></i>:</span></td> 1773<td>the file output</td> 1774</tr> 1775<tr> 1776<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1777<td>the buffer to dump</td> 1778</tr> 1779<tr> 1780<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1781<td>the number of #xmlChar written</td> 1782</tr> 1783</tbody> 1784</table></div> 1785</div> 1786<hr> 1787<div class="refsect2" lang="en"> 1788<h3> 1789<a name="xmlBufferEmpty"></a>xmlBufferEmpty ()</h3> 1790<pre class="programlisting">void xmlBufferEmpty (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br> 1791</pre> 1792<p>empty a buffer.</p> 1793<div class="variablelist"><table border="0"> 1794<col align="left"> 1795<tbody><tr> 1796<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1797<td>the buffer</td> 1798</tr></tbody> 1799</table></div> 1800</div> 1801<hr> 1802<div class="refsect2" lang="en"> 1803<h3> 1804<a name="xmlBufferFree"></a>xmlBufferFree ()</h3> 1805<pre class="programlisting">void xmlBufferFree (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf)<br> 1806</pre> 1807<p>Frees an XML buffer. It frees both the content and the structure which encapsulate it.</p> 1808<div class="variablelist"><table border="0"> 1809<col align="left"> 1810<tbody><tr> 1811<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1812<td>the buffer to free</td> 1813</tr></tbody> 1814</table></div> 1815</div> 1816<hr> 1817<div class="refsect2" lang="en"> 1818<h3> 1819<a name="xmlBufferGrow"></a>xmlBufferGrow ()</h3> 1820<pre class="programlisting">int xmlBufferGrow (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int len)<br> 1821</pre> 1822<p>Grow the available space of an XML buffer.</p> 1823<div class="variablelist"><table border="0"> 1824<col align="left"> 1825<tbody> 1826<tr> 1827<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1828<td>the buffer</td> 1829</tr> 1830<tr> 1831<td><span class="term"><i><tt>len</tt></i>:</span></td> 1832<td>the minimum free size to allocate</td> 1833</tr> 1834<tr> 1835<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1836<td>the new available space or -1 in case of error</td> 1837</tr> 1838</tbody> 1839</table></div> 1840</div> 1841<hr> 1842<div class="refsect2" lang="en"> 1843<h3> 1844<a name="xmlBufferLength"></a>xmlBufferLength ()</h3> 1845<pre class="programlisting">int xmlBufferLength (const <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> * buf)<br> 1846</pre> 1847<p>Function to get the length of a buffer</p> 1848<div class="variablelist"><table border="0"> 1849<col align="left"> 1850<tbody> 1851<tr> 1852<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1853<td>the buffer</td> 1854</tr> 1855<tr> 1856<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1857<td>the length of data in the internal content</td> 1858</tr> 1859</tbody> 1860</table></div> 1861</div> 1862<hr> 1863<div class="refsect2" lang="en"> 1864<h3> 1865<a name="xmlBufferResize"></a>xmlBufferResize ()</h3> 1866<pre class="programlisting">int xmlBufferResize (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int size)<br> 1867</pre> 1868<p>Resize a buffer to accommodate minimum size of @size.</p> 1869<div class="variablelist"><table border="0"> 1870<col align="left"> 1871<tbody> 1872<tr> 1873<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1874<td>the buffer to resize</td> 1875</tr> 1876<tr> 1877<td><span class="term"><i><tt>size</tt></i>:</span></td> 1878<td>the desired size</td> 1879</tr> 1880<tr> 1881<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1882<td>0 in case of problems, 1 otherwise</td> 1883</tr> 1884</tbody> 1885</table></div> 1886</div> 1887<hr> 1888<div class="refsect2" lang="en"> 1889<h3> 1890<a name="xmlBufferSetAllocationScheme"></a>xmlBufferSetAllocationScheme ()</h3> 1891<pre class="programlisting">void xmlBufferSetAllocationScheme (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br> 1892</pre> 1893<p>Sets the allocation scheme for this buffer</p> 1894<div class="variablelist"><table border="0"> 1895<col align="left"> 1896<tbody> 1897<tr> 1898<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1899<td>the buffer to tune</td> 1900</tr> 1901<tr> 1902<td><span class="term"><i><tt>scheme</tt></i>:</span></td> 1903<td>allocation scheme to use</td> 1904</tr> 1905</tbody> 1906</table></div> 1907</div> 1908<hr> 1909<div class="refsect2" lang="en"> 1910<h3> 1911<a name="xmlBufferShrink"></a>xmlBufferShrink ()</h3> 1912<pre class="programlisting">int xmlBufferShrink (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> unsigned int len)<br> 1913</pre> 1914<p>Remove the beginning of an XML buffer.</p> 1915<div class="variablelist"><table border="0"> 1916<col align="left"> 1917<tbody> 1918<tr> 1919<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1920<td>the buffer to dump</td> 1921</tr> 1922<tr> 1923<td><span class="term"><i><tt>len</tt></i>:</span></td> 1924<td>the number of <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> to remove</td> 1925</tr> 1926<tr> 1927<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 1928<td>the number of #xmlChar removed, or -1 in case of failure.</td> 1929</tr> 1930</tbody> 1931</table></div> 1932</div> 1933<hr> 1934<div class="refsect2" lang="en"> 1935<h3> 1936<a name="xmlBufferWriteCHAR"></a>xmlBufferWriteCHAR ()</h3> 1937<pre class="programlisting">void xmlBufferWriteCHAR (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br> 1938</pre> 1939<p>routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.</p> 1940<div class="variablelist"><table border="0"> 1941<col align="left"> 1942<tbody> 1943<tr> 1944<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1945<td>the XML buffer</td> 1946</tr> 1947<tr> 1948<td><span class="term"><i><tt>string</tt></i>:</span></td> 1949<td>the string to add</td> 1950</tr> 1951</tbody> 1952</table></div> 1953</div> 1954<hr> 1955<div class="refsect2" lang="en"> 1956<h3> 1957<a name="xmlBufferWriteChar"></a>xmlBufferWriteChar ()</h3> 1958<pre class="programlisting">void xmlBufferWriteChar (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const char * string)<br> 1959</pre> 1960<p>routine which manage and grows an output buffer. This one add C chars at the end of the array.</p> 1961<div class="variablelist"><table border="0"> 1962<col align="left"> 1963<tbody> 1964<tr> 1965<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1966<td>the XML buffer output</td> 1967</tr> 1968<tr> 1969<td><span class="term"><i><tt>string</tt></i>:</span></td> 1970<td>the string to add</td> 1971</tr> 1972</tbody> 1973</table></div> 1974</div> 1975<hr> 1976<div class="refsect2" lang="en"> 1977<h3> 1978<a name="xmlBufferWriteQuotedString"></a>xmlBufferWriteQuotedString ()</h3> 1979<pre class="programlisting">void xmlBufferWriteQuotedString (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * string)<br> 1980</pre> 1981<p>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</p> 1982<div class="variablelist"><table border="0"> 1983<col align="left"> 1984<tbody> 1985<tr> 1986<td><span class="term"><i><tt>buf</tt></i>:</span></td> 1987<td>the XML buffer output</td> 1988</tr> 1989<tr> 1990<td><span class="term"><i><tt>string</tt></i>:</span></td> 1991<td>the string to add</td> 1992</tr> 1993</tbody> 1994</table></div> 1995</div> 1996<hr> 1997<div class="refsect2" lang="en"> 1998<h3> 1999<a name="xmlBuildQName"></a>xmlBuildQName ()</h3> 2000<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlBuildQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ncname, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * memory, <br> int len)<br> 2001</pre> 2002<p>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.</p> 2003<div class="variablelist"><table border="0"> 2004<col align="left"> 2005<tbody> 2006<tr> 2007<td><span class="term"><i><tt>ncname</tt></i>:</span></td> 2008<td>the Name</td> 2009</tr> 2010<tr> 2011<td><span class="term"><i><tt>prefix</tt></i>:</span></td> 2012<td>the prefix</td> 2013</tr> 2014<tr> 2015<td><span class="term"><i><tt>memory</tt></i>:</span></td> 2016<td>preallocated memory</td> 2017</tr> 2018<tr> 2019<td><span class="term"><i><tt>len</tt></i>:</span></td> 2020<td>preallocated memory length</td> 2021</tr> 2022<tr> 2023<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2024<td>the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error</td> 2025</tr> 2026</tbody> 2027</table></div> 2028</div> 2029<hr> 2030<div class="refsect2" lang="en"> 2031<h3> 2032<a name="xmlChildElementCount"></a>xmlChildElementCount ()</h3> 2033<pre class="programlisting">unsigned long xmlChildElementCount (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br> 2034</pre> 2035<p>Count the number of child nodes which are elements. Note that entity references are not expanded.</p> 2036<div class="variablelist"><table border="0"> 2037<col align="left"> 2038<tbody> 2039<tr> 2040<td><span class="term"><i><tt>parent</tt></i>:</span></td> 2041<td>the parent node</td> 2042</tr> 2043<tr> 2044<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2045<td>the number of element children or 0 if arguments are invalid.</td> 2046</tr> 2047</tbody> 2048</table></div> 2049</div> 2050<hr> 2051<div class="refsect2" lang="en"> 2052<h3> 2053<a name="xmlCopyDoc"></a>xmlCopyDoc ()</h3> 2054<pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlCopyDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int recursive)<br> 2055</pre> 2056<p>Copy a document. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.</p> 2057<div class="variablelist"><table border="0"> 2058<col align="left"> 2059<tbody> 2060<tr> 2061<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2062<td>the document</td> 2063</tr> 2064<tr> 2065<td><span class="term"><i><tt>recursive</tt></i>:</span></td> 2066<td>if not zero do a recursive copy.</td> 2067</tr> 2068<tr> 2069<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2070<td>the copied document or NULL if a memory allocation failed.</td> 2071</tr> 2072</tbody> 2073</table></div> 2074</div> 2075<hr> 2076<div class="refsect2" lang="en"> 2077<h3> 2078<a name="xmlCopyDtd"></a>xmlCopyDtd ()</h3> 2079<pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCopyDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> dtd)<br> 2080</pre> 2081<p>Copy a DTD.</p> 2082<div class="variablelist"><table border="0"> 2083<col align="left"> 2084<tbody> 2085<tr> 2086<td><span class="term"><i><tt>dtd</tt></i>:</span></td> 2087<td>the DTD</td> 2088</tr> 2089<tr> 2090<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2091<td>the copied DTD or NULL if a memory allocation failed.</td> 2092</tr> 2093</tbody> 2094</table></div> 2095</div> 2096<hr> 2097<div class="refsect2" lang="en"> 2098<h3> 2099<a name="xmlCopyNamespace"></a>xmlCopyNamespace ()</h3> 2100<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespace (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br> 2101</pre> 2102<p>Copy a namespace.</p> 2103<div class="variablelist"><table border="0"> 2104<col align="left"> 2105<tbody> 2106<tr> 2107<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2108<td>the namespace</td> 2109</tr> 2110<tr> 2111<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2112<td>the copied namespace or NULL if a memory allocation failed.</td> 2113</tr> 2114</tbody> 2115</table></div> 2116</div> 2117<hr> 2118<div class="refsect2" lang="en"> 2119<h3> 2120<a name="xmlCopyNamespaceList"></a>xmlCopyNamespaceList ()</h3> 2121<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlCopyNamespaceList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br> 2122</pre> 2123<p>Copy a namespace list.</p> 2124<div class="variablelist"><table border="0"> 2125<col align="left"> 2126<tbody> 2127<tr> 2128<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2129<td>the first namespace</td> 2130</tr> 2131<tr> 2132<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2133<td>the head of the copied list or NULL if a memory allocation failed.</td> 2134</tr> 2135</tbody> 2136</table></div> 2137</div> 2138<hr> 2139<div class="refsect2" lang="en"> 2140<h3> 2141<a name="xmlCopyNode"></a>xmlCopyNode ()</h3> 2142<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> int extended)<br> 2143</pre> 2144<p>Copy a node. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlDocCopyNode">xmlDocCopyNode</a>.</p> 2145<div class="variablelist"><table border="0"> 2146<col align="left"> 2147<tbody> 2148<tr> 2149<td><span class="term"><i><tt>node</tt></i>:</span></td> 2150<td>the node</td> 2151</tr> 2152<tr> 2153<td><span class="term"><i><tt>extended</tt></i>:</span></td> 2154<td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td> 2155</tr> 2156<tr> 2157<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2158<td>the copied node or NULL if a memory allocation failed.</td> 2159</tr> 2160</tbody> 2161</table></div> 2162</div> 2163<hr> 2164<div class="refsect2" lang="en"> 2165<h3> 2166<a name="xmlCopyNodeList"></a>xmlCopyNodeList ()</h3> 2167<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlCopyNodeList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 2168</pre> 2169<p>Copy a node list and all children. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlDocCopyNodeList">xmlDocCopyNodeList</a>.</p> 2170<div class="variablelist"><table border="0"> 2171<col align="left"> 2172<tbody> 2173<tr> 2174<td><span class="term"><i><tt>node</tt></i>:</span></td> 2175<td>the first node in the list.</td> 2176</tr> 2177<tr> 2178<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2179<td>the head of the copied list or NULL if a memory allocation failed.</td> 2180</tr> 2181</tbody> 2182</table></div> 2183</div> 2184<hr> 2185<div class="refsect2" lang="en"> 2186<h3> 2187<a name="xmlCopyProp"></a>xmlCopyProp ()</h3> 2188<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br> 2189</pre> 2190<p>Create a copy of the <a href="libxml2-SAX.html#attribute">attribute</a>. This function sets the parent pointer of the copy to @target but doesn't set the <a href="libxml2-SAX.html#attribute">attribute</a> on the target element. Users should consider to set the <a href="libxml2-SAX.html#attribute">attribute</a> by calling <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a> afterwards or reset the parent pointer to NULL.</p> 2191<div class="variablelist"><table border="0"> 2192<col align="left"> 2193<tbody> 2194<tr> 2195<td><span class="term"><i><tt>target</tt></i>:</span></td> 2196<td>the element where the <a href="libxml2-SAX.html#attribute">attribute</a> will be grafted</td> 2197</tr> 2198<tr> 2199<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2200<td>the <a href="libxml2-SAX.html#attribute">attribute</a> 2201</td> 2202</tr> 2203<tr> 2204<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2205<td>the copied <a href="libxml2-SAX.html#attribute">attribute</a> or NULL if a memory allocation failed.</td> 2206</tr> 2207</tbody> 2208</table></div> 2209</div> 2210<hr> 2211<div class="refsect2" lang="en"> 2212<h3> 2213<a name="xmlCopyPropList"></a>xmlCopyPropList ()</h3> 2214<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlCopyPropList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> target, <br> <a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br> 2215</pre> 2216<p>Create a copy of an <a href="libxml2-SAX.html#attribute">attribute</a> list. This function sets the parent pointers of the copied attributes to @target but doesn't set the attributes on the target element.</p> 2217<div class="variablelist"><table border="0"> 2218<col align="left"> 2219<tbody> 2220<tr> 2221<td><span class="term"><i><tt>target</tt></i>:</span></td> 2222<td>the element where the attributes will be grafted</td> 2223</tr> 2224<tr> 2225<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2226<td>the first <a href="libxml2-SAX.html#attribute">attribute</a> 2227</td> 2228</tr> 2229<tr> 2230<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2231<td>the head of the copied list or NULL if a memory allocation failed.</td> 2232</tr> 2233</tbody> 2234</table></div> 2235</div> 2236<hr> 2237<div class="refsect2" lang="en"> 2238<h3> 2239<a name="xmlCreateIntSubset"></a>xmlCreateIntSubset ()</h3> 2240<pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlCreateIntSubset (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br> 2241</pre> 2242<p>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.</p> 2243<div class="variablelist"><table border="0"> 2244<col align="left"> 2245<tbody> 2246<tr> 2247<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2248<td>the document pointer (optional)</td> 2249</tr> 2250<tr> 2251<td><span class="term"><i><tt>name</tt></i>:</span></td> 2252<td>the DTD name (optional)</td> 2253</tr> 2254<tr> 2255<td><span class="term"><i><tt>ExternalID</tt></i>:</span></td> 2256<td>the external (PUBLIC) ID (optional)</td> 2257</tr> 2258<tr> 2259<td><span class="term"><i><tt>SystemID</tt></i>:</span></td> 2260<td>the system ID (optional)</td> 2261</tr> 2262<tr> 2263<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2264<td>a pointer to the new or existing DTD object or NULL if arguments are invalid or a memory allocation failed.</td> 2265</tr> 2266</tbody> 2267</table></div> 2268</div> 2269<hr> 2270<div class="refsect2" lang="en"> 2271<h3> 2272<a name="xmlDOMWrapAdoptNode"></a>xmlDOMWrapAdoptNode ()</h3> 2273<pre class="programlisting">int xmlDOMWrapAdoptNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br> int options)<br> 2274</pre> 2275<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p> 2276<div class="variablelist"><table border="0"> 2277<col align="left"> 2278<tbody> 2279<tr> 2280<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 2281<td>the optional context for custom processing</td> 2282</tr> 2283<tr> 2284<td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td> 2285<td>the optional sourceDoc</td> 2286</tr> 2287<tr> 2288<td><span class="term"><i><tt>node</tt></i>:</span></td> 2289<td>the node to start with</td> 2290</tr> 2291<tr> 2292<td><span class="term"><i><tt>destDoc</tt></i>:</span></td> 2293<td>the destination doc</td> 2294</tr> 2295<tr> 2296<td><span class="term"><i><tt>destParent</tt></i>:</span></td> 2297<td>the optional new parent of @node in @destDoc</td> 2298</tr> 2299<tr> 2300<td><span class="term"><i><tt>options</tt></i>:</span></td> 2301<td>option flags</td> 2302</tr> 2303<tr> 2304<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2305<td>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.</td> 2306</tr> 2307</tbody> 2308</table></div> 2309</div> 2310<hr> 2311<div class="refsect2" lang="en"> 2312<h3> 2313<a name="xmlDOMWrapCloneNode"></a>xmlDOMWrapCloneNode ()</h3> 2314<pre class="programlisting">int xmlDOMWrapCloneNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> sourceDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> * resNode, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> destDoc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> destParent, <br> int deep, <br> int options)<br> 2315</pre> 2316<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.</p> 2317<div class="variablelist"><table border="0"> 2318<col align="left"> 2319<tbody> 2320<tr> 2321<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 2322<td>the optional context for custom processing</td> 2323</tr> 2324<tr> 2325<td><span class="term"><i><tt>sourceDoc</tt></i>:</span></td> 2326<td>the optional sourceDoc</td> 2327</tr> 2328<tr> 2329<td><span class="term"><i><tt>node</tt></i>:</span></td> 2330<td>the node to start with</td> 2331</tr> 2332<tr> 2333<td><span class="term"><i><tt>resNode</tt></i>:</span></td> 2334<td>the clone of the given @node</td> 2335</tr> 2336<tr> 2337<td><span class="term"><i><tt>destDoc</tt></i>:</span></td> 2338<td>the destination doc</td> 2339</tr> 2340<tr> 2341<td><span class="term"><i><tt>destParent</tt></i>:</span></td> 2342<td>the optional new parent of @node in @destDoc</td> 2343</tr> 2344<tr> 2345<td><span class="term"><i><tt>deep</tt></i>:</span></td> 2346<td>descend into child if set</td> 2347</tr> 2348<tr> 2349<td><span class="term"><i><tt>options</tt></i>:</span></td> 2350<td>option flags</td> 2351</tr> 2352<tr> 2353<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2354<td>0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors.</td> 2355</tr> 2356</tbody> 2357</table></div> 2358</div> 2359<hr> 2360<div class="refsect2" lang="en"> 2361<h3> 2362<a name="xmlDOMWrapFreeCtxt"></a>xmlDOMWrapFreeCtxt ()</h3> 2363<pre class="programlisting">void xmlDOMWrapFreeCtxt (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt)<br> 2364</pre> 2365<p>Frees the DOM-wrapper context.</p> 2366<div class="variablelist"><table border="0"> 2367<col align="left"> 2368<tbody><tr> 2369<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 2370<td>the DOM-wrapper context</td> 2371</tr></tbody> 2372</table></div> 2373</div> 2374<hr> 2375<div class="refsect2" lang="en"> 2376<h3> 2377<a name="xmlDOMWrapNewCtxt"></a>xmlDOMWrapNewCtxt ()</h3> 2378<pre class="programlisting"><a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> xmlDOMWrapNewCtxt (void)<br> 2379</pre> 2380<p>Allocates and initializes a new DOM-wrapper context.</p> 2381<div class="variablelist"><table border="0"> 2382<col align="left"> 2383<tbody><tr> 2384<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2385<td>the <a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> or NULL in case of an internal error.</td> 2386</tr></tbody> 2387</table></div> 2388</div> 2389<hr> 2390<div class="refsect2" lang="en"> 2391<h3> 2392<a name="xmlDOMWrapReconcileNamespaces"></a>xmlDOMWrapReconcileNamespaces ()</h3> 2393<pre class="programlisting">int xmlDOMWrapReconcileNamespaces (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> elem, <br> int options)<br> 2394</pre> 2395<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> values or element content. NOTE: This function was not intensively tested.</p> 2396<div class="variablelist"><table border="0"> 2397<col align="left"> 2398<tbody> 2399<tr> 2400<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 2401<td>DOM wrapper context, unused at the moment</td> 2402</tr> 2403<tr> 2404<td><span class="term"><i><tt>elem</tt></i>:</span></td> 2405<td>the element-node</td> 2406</tr> 2407<tr> 2408<td><span class="term"><i><tt>options</tt></i>:</span></td> 2409<td>option flags</td> 2410</tr> 2411<tr> 2412<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2413<td>0 if succeeded, -1 otherwise and on API/internal errors.</td> 2414</tr> 2415</tbody> 2416</table></div> 2417</div> 2418<hr> 2419<div class="refsect2" lang="en"> 2420<h3> 2421<a name="xmlDOMWrapRemoveNode"></a>xmlDOMWrapRemoveNode ()</h3> 2422<pre class="programlisting">int xmlDOMWrapRemoveNode (<a href="libxml2-tree.html#xmlDOMWrapCtxtPtr">xmlDOMWrapCtxtPtr</a> ctxt, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> int options)<br> 2423</pre> 2424<p>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.</p> 2425<div class="variablelist"><table border="0"> 2426<col align="left"> 2427<tbody> 2428<tr> 2429<td><span class="term"><i><tt>ctxt</tt></i>:</span></td> 2430<td>a DOM wrapper context</td> 2431</tr> 2432<tr> 2433<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2434<td>the doc</td> 2435</tr> 2436<tr> 2437<td><span class="term"><i><tt>node</tt></i>:</span></td> 2438<td>the node to be removed.</td> 2439</tr> 2440<tr> 2441<td><span class="term"><i><tt>options</tt></i>:</span></td> 2442<td>set of options, unused at the moment</td> 2443</tr> 2444<tr> 2445<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2446<td>0 on success, 1 if the node is not supported, -1 on API and internal errors.</td> 2447</tr> 2448</tbody> 2449</table></div> 2450</div> 2451<hr> 2452<div class="refsect2" lang="en"> 2453<h3> 2454<a name="xmlDeregisterNodeDefault"></a>xmlDeregisterNodeDefault ()</h3> 2455<pre class="programlisting"><a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlDeregisterNodeDefault (<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br> 2456</pre> 2457<p>DEPRECATED: don't use Registers a callback for node destruction</p> 2458<div class="variablelist"><table border="0"> 2459<col align="left"> 2460<tbody> 2461<tr> 2462<td><span class="term"><i><tt>func</tt></i>:</span></td> 2463<td>function pointer to the new DeregisterNodeFunc</td> 2464</tr> 2465<tr> 2466<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2467<td>the previous value of the deregistration function</td> 2468</tr> 2469</tbody> 2470</table></div> 2471</div> 2472<hr> 2473<div class="refsect2" lang="en"> 2474<h3> 2475<a name="xmlDocCopyNode"></a>xmlDocCopyNode ()</h3> 2476<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int extended)<br> 2477</pre> 2478<p>Copy a node into another document.</p> 2479<div class="variablelist"><table border="0"> 2480<col align="left"> 2481<tbody> 2482<tr> 2483<td><span class="term"><i><tt>node</tt></i>:</span></td> 2484<td>the node</td> 2485</tr> 2486<tr> 2487<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2488<td>the document</td> 2489</tr> 2490<tr> 2491<td><span class="term"><i><tt>extended</tt></i>:</span></td> 2492<td>if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable)</td> 2493</tr> 2494<tr> 2495<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2496<td>the copied node or NULL if a memory allocation failed.</td> 2497</tr> 2498</tbody> 2499</table></div> 2500</div> 2501<hr> 2502<div class="refsect2" lang="en"> 2503<h3> 2504<a name="xmlDocCopyNodeList"></a>xmlDocCopyNodeList ()</h3> 2505<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocCopyNodeList (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 2506</pre> 2507<p>Copy a node list and all children into a new document.</p> 2508<div class="variablelist"><table border="0"> 2509<col align="left"> 2510<tbody> 2511<tr> 2512<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2513<td>the target document</td> 2514</tr> 2515<tr> 2516<td><span class="term"><i><tt>node</tt></i>:</span></td> 2517<td>the first node in the list.</td> 2518</tr> 2519<tr> 2520<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2521<td>the head of the copied list or NULL if a memory allocation failed.</td> 2522</tr> 2523</tbody> 2524</table></div> 2525</div> 2526<hr> 2527<div class="refsect2" lang="en"> 2528<h3> 2529<a name="xmlDocDump"></a>xmlDocDump ()</h3> 2530<pre class="programlisting">int xmlDocDump (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br> 2531</pre> 2532<p>Dump an XML document to an open FILE.</p> 2533<div class="variablelist"><table border="0"> 2534<col align="left"> 2535<tbody> 2536<tr> 2537<td><span class="term"><i><tt>f</tt></i>:</span></td> 2538<td>the FILE*</td> 2539</tr> 2540<tr> 2541<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2542<td>the document</td> 2543</tr> 2544<tr> 2545<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2546<td>the number of bytes written or -1 in case of failure.</td> 2547</tr> 2548</tbody> 2549</table></div> 2550</div> 2551<hr> 2552<div class="refsect2" lang="en"> 2553<h3> 2554<a name="xmlDocDumpFormatMemory"></a>xmlDocDumpFormatMemory ()</h3> 2555<pre class="programlisting">void xmlDocDumpFormatMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br> int * size, <br> int format)<br> 2556</pre> 2557<p>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</p> 2558<div class="variablelist"><table border="0"> 2559<col align="left"> 2560<tbody> 2561<tr> 2562<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2563<td>the document</td> 2564</tr> 2565<tr> 2566<td><span class="term"><i><tt>mem</tt></i>:</span></td> 2567<td>OUT: the memory pointer</td> 2568</tr> 2569<tr> 2570<td><span class="term"><i><tt>size</tt></i>:</span></td> 2571<td>OUT: the memory length</td> 2572</tr> 2573<tr> 2574<td><span class="term"><i><tt>format</tt></i>:</span></td> 2575<td>should formatting spaces been added</td> 2576</tr> 2577</tbody> 2578</table></div> 2579</div> 2580<hr> 2581<div class="refsect2" lang="en"> 2582<h3> 2583<a name="xmlDocDumpFormatMemoryEnc"></a>xmlDocDumpFormatMemoryEnc ()</h3> 2584<pre class="programlisting">void xmlDocDumpFormatMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br> int * doc_txt_len, <br> const char * txt_encoding, <br> int format)<br> 2585</pre> 2586<p>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</p> 2587<div class="variablelist"><table border="0"> 2588<col align="left"> 2589<tbody> 2590<tr> 2591<td><span class="term"><i><tt>out_doc</tt></i>:</span></td> 2592<td>Document to generate XML text from</td> 2593</tr> 2594<tr> 2595<td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td> 2596<td>Memory pointer for allocated XML text</td> 2597</tr> 2598<tr> 2599<td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td> 2600<td>Length of the generated XML text</td> 2601</tr> 2602<tr> 2603<td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td> 2604<td>Character encoding to use when generating XML text</td> 2605</tr> 2606<tr> 2607<td><span class="term"><i><tt>format</tt></i>:</span></td> 2608<td>should formatting spaces been added</td> 2609</tr> 2610</tbody> 2611</table></div> 2612</div> 2613<hr> 2614<div class="refsect2" lang="en"> 2615<h3> 2616<a name="xmlDocDumpMemory"></a>xmlDocDumpMemory ()</h3> 2617<pre class="programlisting">void xmlDocDumpMemory (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** mem, <br> int * size)<br> 2618</pre> 2619<p>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.</p> 2620<div class="variablelist"><table border="0"> 2621<col align="left"> 2622<tbody> 2623<tr> 2624<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2625<td>the document</td> 2626</tr> 2627<tr> 2628<td><span class="term"><i><tt>mem</tt></i>:</span></td> 2629<td>OUT: the memory pointer</td> 2630</tr> 2631<tr> 2632<td><span class="term"><i><tt>size</tt></i>:</span></td> 2633<td>OUT: the memory length</td> 2634</tr> 2635</tbody> 2636</table></div> 2637</div> 2638<hr> 2639<div class="refsect2" lang="en"> 2640<h3> 2641<a name="xmlDocDumpMemoryEnc"></a>xmlDocDumpMemoryEnc ()</h3> 2642<pre class="programlisting">void xmlDocDumpMemoryEnc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> out_doc, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** doc_txt_ptr, <br> int * doc_txt_len, <br> const char * txt_encoding)<br> 2643</pre> 2644<p>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().</p> 2645<div class="variablelist"><table border="0"> 2646<col align="left"> 2647<tbody> 2648<tr> 2649<td><span class="term"><i><tt>out_doc</tt></i>:</span></td> 2650<td>Document to generate XML text from</td> 2651</tr> 2652<tr> 2653<td><span class="term"><i><tt>doc_txt_ptr</tt></i>:</span></td> 2654<td>Memory pointer for allocated XML text</td> 2655</tr> 2656<tr> 2657<td><span class="term"><i><tt>doc_txt_len</tt></i>:</span></td> 2658<td>Length of the generated XML text</td> 2659</tr> 2660<tr> 2661<td><span class="term"><i><tt>txt_encoding</tt></i>:</span></td> 2662<td>Character encoding to use when generating XML text</td> 2663</tr> 2664</tbody> 2665</table></div> 2666</div> 2667<hr> 2668<div class="refsect2" lang="en"> 2669<h3> 2670<a name="xmlDocFormatDump"></a>xmlDocFormatDump ()</h3> 2671<pre class="programlisting">int xmlDocFormatDump (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> int format)<br> 2672</pre> 2673<p>Dump an XML document to an open FILE.</p> 2674<div class="variablelist"><table border="0"> 2675<col align="left"> 2676<tbody> 2677<tr> 2678<td><span class="term"><i><tt>f</tt></i>:</span></td> 2679<td>the FILE*</td> 2680</tr> 2681<tr> 2682<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2683<td>the document</td> 2684</tr> 2685<tr> 2686<td><span class="term"><i><tt>format</tt></i>:</span></td> 2687<td>should formatting spaces been added</td> 2688</tr> 2689<tr> 2690<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2691<td>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</td> 2692</tr> 2693</tbody> 2694</table></div> 2695</div> 2696<hr> 2697<div class="refsect2" lang="en"> 2698<h3> 2699<a name="xmlDocGetRootElement"></a>xmlDocGetRootElement ()</h3> 2700<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocGetRootElement (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br> 2701</pre> 2702<p>Get the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).</p> 2703<div class="variablelist"><table border="0"> 2704<col align="left"> 2705<tbody> 2706<tr> 2707<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2708<td>the document</td> 2709</tr> 2710<tr> 2711<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2712<td>the root element or NULL if no element was found.</td> 2713</tr> 2714</tbody> 2715</table></div> 2716</div> 2717<hr> 2718<div class="refsect2" lang="en"> 2719<h3> 2720<a name="xmlDocSetRootElement"></a>xmlDocSetRootElement ()</h3> 2721<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlDocSetRootElement (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> root)<br> 2722</pre> 2723<p>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.</p> 2724<div class="variablelist"><table border="0"> 2725<col align="left"> 2726<tbody> 2727<tr> 2728<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2729<td>the document</td> 2730</tr> 2731<tr> 2732<td><span class="term"><i><tt>root</tt></i>:</span></td> 2733<td>the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead.</td> 2734</tr> 2735<tr> 2736<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2737<td>the unlinked old root element or NULL if the document didn't have a root element or a memory allocation failed.</td> 2738</tr> 2739</tbody> 2740</table></div> 2741</div> 2742<hr> 2743<div class="refsect2" lang="en"> 2744<h3> 2745<a name="xmlElemDump"></a>xmlElemDump ()</h3> 2746<pre class="programlisting">void xmlElemDump (FILE * f, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 2747</pre> 2748<p>Dump an XML/HTML node, recursive behaviour, children are printed too.</p> 2749<div class="variablelist"><table border="0"> 2750<col align="left"> 2751<tbody> 2752<tr> 2753<td><span class="term"><i><tt>f</tt></i>:</span></td> 2754<td>the FILE * for the output</td> 2755</tr> 2756<tr> 2757<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2758<td>the document</td> 2759</tr> 2760<tr> 2761<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2762<td>the current node</td> 2763</tr> 2764</tbody> 2765</table></div> 2766</div> 2767<hr> 2768<div class="refsect2" lang="en"> 2769<h3> 2770<a name="xmlFirstElementChild"></a>xmlFirstElementChild ()</h3> 2771<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlFirstElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br> 2772</pre> 2773<p>Find the first child node which is an element. Note that entity references are not expanded.</p> 2774<div class="variablelist"><table border="0"> 2775<col align="left"> 2776<tbody> 2777<tr> 2778<td><span class="term"><i><tt>parent</tt></i>:</span></td> 2779<td>the parent node</td> 2780</tr> 2781<tr> 2782<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2783<td>the first element or NULL if parent has no children.</td> 2784</tr> 2785</tbody> 2786</table></div> 2787</div> 2788<hr> 2789<div class="refsect2" lang="en"> 2790<h3> 2791<a name="xmlFreeDoc"></a>xmlFreeDoc ()</h3> 2792<pre class="programlisting">void xmlFreeDoc (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br> 2793</pre> 2794<p>Free a document including all children and associated DTDs.</p> 2795<div class="variablelist"><table border="0"> 2796<col align="left"> 2797<tbody><tr> 2798<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2799<td>pointer to the document</td> 2800</tr></tbody> 2801</table></div> 2802</div> 2803<hr> 2804<div class="refsect2" lang="en"> 2805<h3> 2806<a name="xmlFreeDtd"></a>xmlFreeDtd ()</h3> 2807<pre class="programlisting">void xmlFreeDtd (<a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> cur)<br> 2808</pre> 2809<p>Free a DTD structure.</p> 2810<div class="variablelist"><table border="0"> 2811<col align="left"> 2812<tbody><tr> 2813<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2814<td>the DTD structure to free up</td> 2815</tr></tbody> 2816</table></div> 2817</div> 2818<hr> 2819<div class="refsect2" lang="en"> 2820<h3> 2821<a name="xmlFreeNode"></a>xmlFreeNode ()</h3> 2822<pre class="programlisting">void xmlFreeNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 2823</pre> 2824<p>Free a node including all the children. This doesn't unlink the node from the tree. Call <a href="libxml2-tree.html#xmlUnlinkNode">xmlUnlinkNode</a> first unless @cur is a root node.</p> 2825<div class="variablelist"><table border="0"> 2826<col align="left"> 2827<tbody><tr> 2828<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2829<td>the node</td> 2830</tr></tbody> 2831</table></div> 2832</div> 2833<hr> 2834<div class="refsect2" lang="en"> 2835<h3> 2836<a name="xmlFreeNodeList"></a>xmlFreeNodeList ()</h3> 2837<pre class="programlisting">void xmlFreeNodeList (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 2838</pre> 2839<p>Free a node list including all children.</p> 2840<div class="variablelist"><table border="0"> 2841<col align="left"> 2842<tbody><tr> 2843<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2844<td>the first node in the list</td> 2845</tr></tbody> 2846</table></div> 2847</div> 2848<hr> 2849<div class="refsect2" lang="en"> 2850<h3> 2851<a name="xmlFreeNs"></a>xmlFreeNs ()</h3> 2852<pre class="programlisting">void xmlFreeNs (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br> 2853</pre> 2854<p>Free an <a href="libxml2-tree.html#xmlNs">xmlNs</a> object.</p> 2855<div class="variablelist"><table border="0"> 2856<col align="left"> 2857<tbody><tr> 2858<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2859<td>the namespace pointer</td> 2860</tr></tbody> 2861</table></div> 2862</div> 2863<hr> 2864<div class="refsect2" lang="en"> 2865<h3> 2866<a name="xmlFreeNsList"></a>xmlFreeNsList ()</h3> 2867<pre class="programlisting">void xmlFreeNsList (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> cur)<br> 2868</pre> 2869<p>Free a list of <a href="libxml2-tree.html#xmlNs">xmlNs</a> objects.</p> 2870<div class="variablelist"><table border="0"> 2871<col align="left"> 2872<tbody><tr> 2873<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2874<td>the first namespace pointer</td> 2875</tr></tbody> 2876</table></div> 2877</div> 2878<hr> 2879<div class="refsect2" lang="en"> 2880<h3> 2881<a name="xmlFreeProp"></a>xmlFreeProp ()</h3> 2882<pre class="programlisting">void xmlFreeProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br> 2883</pre> 2884<p>Free an <a href="libxml2-SAX.html#attribute">attribute</a> including all children.</p> 2885<div class="variablelist"><table border="0"> 2886<col align="left"> 2887<tbody><tr> 2888<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2889<td>an <a href="libxml2-SAX.html#attribute">attribute</a> 2890</td> 2891</tr></tbody> 2892</table></div> 2893</div> 2894<hr> 2895<div class="refsect2" lang="en"> 2896<h3> 2897<a name="xmlFreePropList"></a>xmlFreePropList ()</h3> 2898<pre class="programlisting">void xmlFreePropList (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br> 2899</pre> 2900<p>Free an <a href="libxml2-SAX.html#attribute">attribute</a> list including all children.</p> 2901<div class="variablelist"><table border="0"> 2902<col align="left"> 2903<tbody><tr> 2904<td><span class="term"><i><tt>cur</tt></i>:</span></td> 2905<td>the first <a href="libxml2-SAX.html#attribute">attribute</a> in the list</td> 2906</tr></tbody> 2907</table></div> 2908</div> 2909<hr> 2910<div class="refsect2" lang="en"> 2911<h3> 2912<a name="xmlGetBufferAllocationScheme"></a>xmlGetBufferAllocationScheme ()</h3> 2913<pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlGetBufferAllocationScheme (void)<br> 2914</pre> 2915<p>Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance <a href="libxml2-tree.html#XML_BUFFER_ALLOC_HYBRID">XML_BUFFER_ALLOC_HYBRID</a> - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.</p> 2916<div class="variablelist"><table border="0"> 2917<col align="left"> 2918<tbody><tr> 2919<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2920<td>the current allocation scheme</td> 2921</tr></tbody> 2922</table></div> 2923</div> 2924<hr> 2925<div class="refsect2" lang="en"> 2926<h3> 2927<a name="xmlGetCompressMode"></a>xmlGetCompressMode ()</h3> 2928<pre class="programlisting">int xmlGetCompressMode (void)<br> 2929</pre> 2930<p>DEPRECATED: Use <a href="libxml2-tree.html#xmlGetDocCompressMode">xmlGetDocCompressMode</a> get the default compression mode used, ZLIB based.</p> 2931<div class="variablelist"><table border="0"> 2932<col align="left"> 2933<tbody><tr> 2934<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2935<td>0 (uncompressed) to 9 (max compression)</td> 2936</tr></tbody> 2937</table></div> 2938</div> 2939<hr> 2940<div class="refsect2" lang="en"> 2941<h3> 2942<a name="xmlGetDocCompressMode"></a>xmlGetDocCompressMode ()</h3> 2943<pre class="programlisting">int xmlGetDocCompressMode (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br> 2944</pre> 2945<p>get the compression ratio for a document, ZLIB based</p> 2946<div class="variablelist"><table border="0"> 2947<col align="left"> 2948<tbody> 2949<tr> 2950<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2951<td>the document</td> 2952</tr> 2953<tr> 2954<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2955<td>0 (uncompressed) to 9 (max compression)</td> 2956</tr> 2957</tbody> 2958</table></div> 2959</div> 2960<hr> 2961<div class="refsect2" lang="en"> 2962<h3> 2963<a name="xmlGetIntSubset"></a>xmlGetIntSubset ()</h3> 2964<pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlGetIntSubset (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc)<br> 2965</pre> 2966<p>Get the internal subset of a document.</p> 2967<div class="variablelist"><table border="0"> 2968<col align="left"> 2969<tbody> 2970<tr> 2971<td><span class="term"><i><tt>doc</tt></i>:</span></td> 2972<td>the document pointer</td> 2973</tr> 2974<tr> 2975<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2976<td>a pointer to the DTD object or NULL if not found.</td> 2977</tr> 2978</tbody> 2979</table></div> 2980</div> 2981<hr> 2982<div class="refsect2" lang="en"> 2983<h3> 2984<a name="xmlGetLastChild"></a>xmlGetLastChild ()</h3> 2985<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlGetLastChild (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * parent)<br> 2986</pre> 2987<p>Find the last child of a node.</p> 2988<div class="variablelist"><table border="0"> 2989<col align="left"> 2990<tbody> 2991<tr> 2992<td><span class="term"><i><tt>parent</tt></i>:</span></td> 2993<td>the parent node</td> 2994</tr> 2995<tr> 2996<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 2997<td>the last child or NULL if parent has no children.</td> 2998</tr> 2999</tbody> 3000</table></div> 3001</div> 3002<hr> 3003<div class="refsect2" lang="en"> 3004<h3> 3005<a name="xmlGetLineNo"></a>xmlGetLineNo ()</h3> 3006<pre class="programlisting">long xmlGetLineNo (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br> 3007</pre> 3008<p>Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if <a href="libxml2-parser.html#XML_PARSE_BIG_LINES">XML_PARSE_BIG_LINES</a> parser option was used</p> 3009<div class="variablelist"><table border="0"> 3010<col align="left"> 3011<tbody> 3012<tr> 3013<td><span class="term"><i><tt>node</tt></i>:</span></td> 3014<td>valid node</td> 3015</tr> 3016<tr> 3017<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3018<td>the line number if successful, -1 otherwise</td> 3019</tr> 3020</tbody> 3021</table></div> 3022</div> 3023<hr> 3024<div class="refsect2" lang="en"> 3025<h3> 3026<a name="xmlGetNoNsProp"></a>xmlGetNoNsProp ()</h3> 3027<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNoNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3028</pre> 3029<p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values. This function is similar to <a href="libxml2-tree.html#xmlGetProp">xmlGetProp</a> except it will accept only an <a href="libxml2-SAX.html#attribute">attribute</a> in no namespace. NOTE: This function doesn't allow to distinguish malloc failures from missing attributes. It's more robust to use <a href="libxml2-tree.html#xmlNodeGetAttrValue">xmlNodeGetAttrValue</a>.</p> 3030<div class="variablelist"><table border="0"> 3031<col align="left"> 3032<tbody> 3033<tr> 3034<td><span class="term"><i><tt>node</tt></i>:</span></td> 3035<td>the node</td> 3036</tr> 3037<tr> 3038<td><span class="term"><i><tt>name</tt></i>:</span></td> 3039<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 3040</tr> 3041<tr> 3042<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3043<td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().</td> 3044</tr> 3045</tbody> 3046</table></div> 3047</div> 3048<hr> 3049<div class="refsect2" lang="en"> 3050<h3> 3051<a name="xmlGetNodePath"></a>xmlGetNodePath ()</h3> 3052<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNodePath (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br> 3053</pre> 3054<p>Build a structure based Path for the given node</p> 3055<div class="variablelist"><table border="0"> 3056<col align="left"> 3057<tbody> 3058<tr> 3059<td><span class="term"><i><tt>node</tt></i>:</span></td> 3060<td>a node</td> 3061</tr> 3062<tr> 3063<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3064<td>the new path or NULL in case of error. The caller must free the returned string</td> 3065</tr> 3066</tbody> 3067</table></div> 3068</div> 3069<hr> 3070<div class="refsect2" lang="en"> 3071<h3> 3072<a name="xmlGetNsList"></a>xmlGetNsList ()</h3> 3073<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> * xmlGetNsList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br> 3074</pre> 3075<p>Find all in-scope namespaces of a node. Use <a href="libxml2-tree.html#xmlGetNsListSafe">xmlGetNsListSafe</a> for better error reporting.</p> 3076<div class="variablelist"><table border="0"> 3077<col align="left"> 3078<tbody> 3079<tr> 3080<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3081<td>the document</td> 3082</tr> 3083<tr> 3084<td><span class="term"><i><tt>node</tt></i>:</span></td> 3085<td>the current node</td> 3086</tr> 3087<tr> 3088<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3089<td>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.</td> 3090</tr> 3091</tbody> 3092</table></div> 3093</div> 3094<hr> 3095<div class="refsect2" lang="en"> 3096<h3> 3097<a name="xmlGetNsListSafe"></a>xmlGetNsListSafe ()</h3> 3098<pre class="programlisting">int xmlGetNsListSafe (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ** out)<br> 3099</pre> 3100<p>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.</p> 3101<div class="variablelist"><table border="0"> 3102<col align="left"> 3103<tbody> 3104<tr> 3105<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3106<td>the document</td> 3107</tr> 3108<tr> 3109<td><span class="term"><i><tt>node</tt></i>:</span></td> 3110<td>the current node</td> 3111</tr> 3112<tr> 3113<td><span class="term"><i><tt>out</tt></i>:</span></td> 3114<td>the returned namespace array</td> 3115</tr> 3116<tr> 3117<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3118<td>0 on success, 1 if no namespaces were found, -1 if a memory allocation failed.</td> 3119</tr> 3120</tbody> 3121</table></div> 3122</div> 3123<hr> 3124<div class="refsect2" lang="en"> 3125<h3> 3126<a name="xmlGetNsProp"></a>xmlGetNsProp ()</h3> 3127<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br> 3128</pre> 3129<p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> 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 <a href="libxml2-tree.html#xmlNodeGetAttrValue">xmlNodeGetAttrValue</a>.</p> 3130<div class="variablelist"><table border="0"> 3131<col align="left"> 3132<tbody> 3133<tr> 3134<td><span class="term"><i><tt>node</tt></i>:</span></td> 3135<td>the node</td> 3136</tr> 3137<tr> 3138<td><span class="term"><i><tt>name</tt></i>:</span></td> 3139<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 3140</tr> 3141<tr> 3142<td><span class="term"><i><tt>nameSpace</tt></i>:</span></td> 3143<td>the URI of the namespace</td> 3144</tr> 3145<tr> 3146<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3147<td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().</td> 3148</tr> 3149</tbody> 3150</table></div> 3151</div> 3152<hr> 3153<div class="refsect2" lang="en"> 3154<h3> 3155<a name="xmlGetProp"></a>xmlGetProp ()</h3> 3156<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlGetProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3157</pre> 3158<p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values. NOTE: This function acts independently of namespaces associated to the <a href="libxml2-SAX.html#attribute">attribute</a>. 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 <a href="libxml2-tree.html#xmlNodeGetAttrValue">xmlNodeGetAttrValue</a>.</p> 3159<div class="variablelist"><table border="0"> 3160<col align="left"> 3161<tbody> 3162<tr> 3163<td><span class="term"><i><tt>node</tt></i>:</span></td> 3164<td>the node</td> 3165</tr> 3166<tr> 3167<td><span class="term"><i><tt>name</tt></i>:</span></td> 3168<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 3169</tr> 3170<tr> 3171<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3172<td>the <a href="libxml2-SAX.html#attribute">attribute</a> value or NULL if not found or a memory allocation failed. It's up to the caller to free the memory with xmlFree().</td> 3173</tr> 3174</tbody> 3175</table></div> 3176</div> 3177<hr> 3178<div class="refsect2" lang="en"> 3179<h3> 3180<a name="xmlHasNsProp"></a>xmlHasNsProp ()</h3> 3181<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasNsProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br> 3182</pre> 3183<p>Search for an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values. Note that a namespace of NULL indicates to use the default namespace.</p> 3184<div class="variablelist"><table border="0"> 3185<col align="left"> 3186<tbody> 3187<tr> 3188<td><span class="term"><i><tt>node</tt></i>:</span></td> 3189<td>the node</td> 3190</tr> 3191<tr> 3192<td><span class="term"><i><tt>name</tt></i>:</span></td> 3193<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 3194</tr> 3195<tr> 3196<td><span class="term"><i><tt>nameSpace</tt></i>:</span></td> 3197<td>the URI of the namespace</td> 3198</tr> 3199<tr> 3200<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3201<td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found. Also returns NULL if a memory allocation failed making this function unreliable.</td> 3202</tr> 3203</tbody> 3204</table></div> 3205</div> 3206<hr> 3207<div class="refsect2" lang="en"> 3208<h3> 3209<a name="xmlHasProp"></a>xmlHasProp ()</h3> 3210<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlHasProp (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3211</pre> 3212<p>Search an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This function also looks in DTD <a href="libxml2-SAX.html#attribute">attribute</a> declaration for #FIXED or default declaration values.</p> 3213<div class="variablelist"><table border="0"> 3214<col align="left"> 3215<tbody> 3216<tr> 3217<td><span class="term"><i><tt>node</tt></i>:</span></td> 3218<td>the node</td> 3219</tr> 3220<tr> 3221<td><span class="term"><i><tt>name</tt></i>:</span></td> 3222<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 3223</tr> 3224<tr> 3225<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3226<td>the <a href="libxml2-SAX.html#attribute">attribute</a> or the <a href="libxml2-SAX.html#attribute">attribute</a> declaration or NULL if neither was found. Also returns NULL if a memory allocation failed making this function unreliable.</td> 3227</tr> 3228</tbody> 3229</table></div> 3230</div> 3231<hr> 3232<div class="refsect2" lang="en"> 3233<h3> 3234<a name="xmlIsBlankNode"></a>xmlIsBlankNode ()</h3> 3235<pre class="programlisting">int xmlIsBlankNode (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br> 3236</pre> 3237<p>Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.</p> 3238<div class="variablelist"><table border="0"> 3239<col align="left"> 3240<tbody> 3241<tr> 3242<td><span class="term"><i><tt>node</tt></i>:</span></td> 3243<td>the node</td> 3244</tr> 3245<tr> 3246<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3247<td>1 yes, 0 no</td> 3248</tr> 3249</tbody> 3250</table></div> 3251</div> 3252<hr> 3253<div class="refsect2" lang="en"> 3254<h3> 3255<a name="xmlIsXHTML"></a>xmlIsXHTML ()</h3> 3256<pre class="programlisting">int xmlIsXHTML (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * systemID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * publicID)<br> 3257</pre> 3258<p>Try to find if the document correspond to an XHTML DTD</p> 3259<div class="variablelist"><table border="0"> 3260<col align="left"> 3261<tbody> 3262<tr> 3263<td><span class="term"><i><tt>systemID</tt></i>:</span></td> 3264<td>the system identifier</td> 3265</tr> 3266<tr> 3267<td><span class="term"><i><tt>publicID</tt></i>:</span></td> 3268<td>the public identifier</td> 3269</tr> 3270<tr> 3271<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3272<td>1 if true, 0 if not and -1 in case of error</td> 3273</tr> 3274</tbody> 3275</table></div> 3276</div> 3277<hr> 3278<div class="refsect2" lang="en"> 3279<h3> 3280<a name="xmlLastElementChild"></a>xmlLastElementChild ()</h3> 3281<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlLastElementChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent)<br> 3282</pre> 3283<p>Find the last child node which is an element. Note that entity references are not expanded.</p> 3284<div class="variablelist"><table border="0"> 3285<col align="left"> 3286<tbody> 3287<tr> 3288<td><span class="term"><i><tt>parent</tt></i>:</span></td> 3289<td>the parent node</td> 3290</tr> 3291<tr> 3292<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3293<td>the last element or NULL if parent has no children.</td> 3294</tr> 3295</tbody> 3296</table></div> 3297</div> 3298<hr> 3299<div class="refsect2" lang="en"> 3300<h3> 3301<a name="xmlNewCDataBlock"></a>xmlNewCDataBlock ()</h3> 3302<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCDataBlock (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 3303</pre> 3304<p>Create a CDATA section node.</p> 3305<div class="variablelist"><table border="0"> 3306<col align="left"> 3307<tbody> 3308<tr> 3309<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3310<td>the target document (optional)</td> 3311</tr> 3312<tr> 3313<td><span class="term"><i><tt>content</tt></i>:</span></td> 3314<td>raw text content (optional)</td> 3315</tr> 3316<tr> 3317<td><span class="term"><i><tt>len</tt></i>:</span></td> 3318<td>size of text content</td> 3319</tr> 3320<tr> 3321<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3322<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3323</tr> 3324</tbody> 3325</table></div> 3326</div> 3327<hr> 3328<div class="refsect2" lang="en"> 3329<h3> 3330<a name="xmlNewCharRef"></a>xmlNewCharRef ()</h3> 3331<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewCharRef (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3332</pre> 3333<p>This function is MISNAMED. It doesn't create a character <a href="libxml2-SAX.html#reference">reference</a> but an entity <a href="libxml2-SAX.html#reference">reference</a>. Create an empty entity <a href="libxml2-SAX.html#reference">reference</a> node. This function doesn't attempt to look up the entity in @doc. Entity names like '&entity;' are handled as well.</p> 3334<div class="variablelist"><table border="0"> 3335<col align="left"> 3336<tbody> 3337<tr> 3338<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3339<td>the target document (optional)</td> 3340</tr> 3341<tr> 3342<td><span class="term"><i><tt>name</tt></i>:</span></td> 3343<td>the entity name</td> 3344</tr> 3345<tr> 3346<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3347<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3348</tr> 3349</tbody> 3350</table></div> 3351</div> 3352<hr> 3353<div class="refsect2" lang="en"> 3354<h3> 3355<a name="xmlNewChild"></a>xmlNewChild ()</h3> 3356<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3357</pre> 3358<p>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 <a href="libxml2-SAX.html#attribute">attribute</a> value possibly containing character and entity references. Text and entity <a href="libxml2-SAX.html#reference">reference</a> node will be added to the child element, see <a href="libxml2-tree.html#xmlNewDocNode">xmlNewDocNode</a>.</p> 3359<div class="variablelist"><table border="0"> 3360<col align="left"> 3361<tbody> 3362<tr> 3363<td><span class="term"><i><tt>parent</tt></i>:</span></td> 3364<td>the parent node</td> 3365</tr> 3366<tr> 3367<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3368<td>a namespace (optional)</td> 3369</tr> 3370<tr> 3371<td><span class="term"><i><tt>name</tt></i>:</span></td> 3372<td>the name of the child</td> 3373</tr> 3374<tr> 3375<td><span class="term"><i><tt>content</tt></i>:</span></td> 3376<td>text content with XML references (optional)</td> 3377</tr> 3378<tr> 3379<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3380<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3381</tr> 3382</tbody> 3383</table></div> 3384</div> 3385<hr> 3386<div class="refsect2" lang="en"> 3387<h3> 3388<a name="xmlNewComment"></a>xmlNewComment ()</h3> 3389<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewComment (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3390</pre> 3391<p>Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocComment">xmlNewDocComment</a>. Create a <a href="libxml2-SAX.html#comment">comment</a> node.</p> 3392<div class="variablelist"><table border="0"> 3393<col align="left"> 3394<tbody> 3395<tr> 3396<td><span class="term"><i><tt>content</tt></i>:</span></td> 3397<td>the <a href="libxml2-SAX.html#comment">comment</a> content (optional)</td> 3398</tr> 3399<tr> 3400<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3401<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3402</tr> 3403</tbody> 3404</table></div> 3405</div> 3406<hr> 3407<div class="refsect2" lang="en"> 3408<h3> 3409<a name="xmlNewDoc"></a>xmlNewDoc ()</h3> 3410<pre class="programlisting"><a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> xmlNewDoc (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * version)<br> 3411</pre> 3412<p>Creates a new XML document. If version is NULL, "1.0" is used.</p> 3413<div class="variablelist"><table border="0"> 3414<col align="left"> 3415<tbody> 3416<tr> 3417<td><span class="term"><i><tt>version</tt></i>:</span></td> 3418<td>XML version string like "1.0" (optional)</td> 3419</tr> 3420<tr> 3421<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3422<td>a new document or NULL if a memory allocation failed.</td> 3423</tr> 3424</tbody> 3425</table></div> 3426</div> 3427<hr> 3428<div class="refsect2" lang="en"> 3429<h3> 3430<a name="xmlNewDocComment"></a>xmlNewDocComment ()</h3> 3431<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocComment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3432</pre> 3433<p>Create a <a href="libxml2-SAX.html#comment">comment</a> node.</p> 3434<div class="variablelist"><table border="0"> 3435<col align="left"> 3436<tbody> 3437<tr> 3438<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3439<td>the document</td> 3440</tr> 3441<tr> 3442<td><span class="term"><i><tt>content</tt></i>:</span></td> 3443<td>the <a href="libxml2-SAX.html#comment">comment</a> content</td> 3444</tr> 3445<tr> 3446<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3447<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3448</tr> 3449</tbody> 3450</table></div> 3451</div> 3452<hr> 3453<div class="refsect2" lang="en"> 3454<h3> 3455<a name="xmlNewDocFragment"></a>xmlNewDocFragment ()</h3> 3456<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocFragment (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br> 3457</pre> 3458<p>Create a document fragment node.</p> 3459<div class="variablelist"><table border="0"> 3460<col align="left"> 3461<tbody> 3462<tr> 3463<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3464<td>the target document (optional)</td> 3465</tr> 3466<tr> 3467<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3468<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3469</tr> 3470</tbody> 3471</table></div> 3472</div> 3473<hr> 3474<div class="refsect2" lang="en"> 3475<h3> 3476<a name="xmlNewDocNode"></a>xmlNewDocNode ()</h3> 3477<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3478</pre> 3479<p>Create an element node. If provided, @content is expected to be a valid XML <a href="libxml2-SAX.html#attribute">attribute</a> 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 <a href="libxml2-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a> 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.</p> 3480<div class="variablelist"><table border="0"> 3481<col align="left"> 3482<tbody> 3483<tr> 3484<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3485<td>the target document</td> 3486</tr> 3487<tr> 3488<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3489<td>namespace (optional)</td> 3490</tr> 3491<tr> 3492<td><span class="term"><i><tt>name</tt></i>:</span></td> 3493<td>the node name</td> 3494</tr> 3495<tr> 3496<td><span class="term"><i><tt>content</tt></i>:</span></td> 3497<td>text content with XML references (optional)</td> 3498</tr> 3499<tr> 3500<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3501<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3502</tr> 3503</tbody> 3504</table></div> 3505</div> 3506<hr> 3507<div class="refsect2" lang="en"> 3508<h3> 3509<a name="xmlNewDocNodeEatName"></a>xmlNewDocNodeEatName ()</h3> 3510<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocNodeEatName (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3511</pre> 3512<p>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.</p> 3513<div class="variablelist"><table border="0"> 3514<col align="left"> 3515<tbody> 3516<tr> 3517<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3518<td>the target document</td> 3519</tr> 3520<tr> 3521<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3522<td>namespace (optional)</td> 3523</tr> 3524<tr> 3525<td><span class="term"><i><tt>name</tt></i>:</span></td> 3526<td>the node name</td> 3527</tr> 3528<tr> 3529<td><span class="term"><i><tt>content</tt></i>:</span></td> 3530<td>text content with XML references (optional)</td> 3531</tr> 3532<tr> 3533<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3534<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3535</tr> 3536</tbody> 3537</table></div> 3538</div> 3539<hr> 3540<div class="refsect2" lang="en"> 3541<h3> 3542<a name="xmlNewDocPI"></a>xmlNewDocPI ()</h3> 3543<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocPI (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3544</pre> 3545<p>Create a processing instruction object.</p> 3546<div class="variablelist"><table border="0"> 3547<col align="left"> 3548<tbody> 3549<tr> 3550<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3551<td>the target document (optional)</td> 3552</tr> 3553<tr> 3554<td><span class="term"><i><tt>name</tt></i>:</span></td> 3555<td>the processing instruction target</td> 3556</tr> 3557<tr> 3558<td><span class="term"><i><tt>content</tt></i>:</span></td> 3559<td>the PI content (optional)</td> 3560</tr> 3561<tr> 3562<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3563<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3564</tr> 3565</tbody> 3566</table></div> 3567</div> 3568<hr> 3569<div class="refsect2" lang="en"> 3570<h3> 3571<a name="xmlNewDocProp"></a>xmlNewDocProp ()</h3> 3572<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewDocProp (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 3573</pre> 3574<p>Create an <a href="libxml2-SAX.html#attribute">attribute</a> object. If provided, @value is expected to be a valid XML <a href="libxml2-SAX.html#attribute">attribute</a> 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 <a href="libxml2-tree.html#xmlNewProp">xmlNewProp</a>.</p> 3575<div class="variablelist"><table border="0"> 3576<col align="left"> 3577<tbody> 3578<tr> 3579<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3580<td>the target document (optional)</td> 3581</tr> 3582<tr> 3583<td><span class="term"><i><tt>name</tt></i>:</span></td> 3584<td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a> 3585</td> 3586</tr> 3587<tr> 3588<td><span class="term"><i><tt>value</tt></i>:</span></td> 3589<td> 3590<a href="libxml2-SAX.html#attribute">attribute</a> value with XML references (optional)</td> 3591</tr> 3592<tr> 3593<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3594<td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a> or NULL if arguments are invalid or a memory allocation failed.</td> 3595</tr> 3596</tbody> 3597</table></div> 3598</div> 3599<hr> 3600<div class="refsect2" lang="en"> 3601<h3> 3602<a name="xmlNewDocRawNode"></a>xmlNewDocRawNode ()</h3> 3603<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocRawNode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3604</pre> 3605<p>Create an element node. If provided, @value should be a raw, unescaped string.</p> 3606<div class="variablelist"><table border="0"> 3607<col align="left"> 3608<tbody> 3609<tr> 3610<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3611<td>the target document</td> 3612</tr> 3613<tr> 3614<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3615<td>namespace (optional)</td> 3616</tr> 3617<tr> 3618<td><span class="term"><i><tt>name</tt></i>:</span></td> 3619<td>the node name</td> 3620</tr> 3621<tr> 3622<td><span class="term"><i><tt>content</tt></i>:</span></td> 3623<td>raw text content (optional)</td> 3624</tr> 3625<tr> 3626<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3627<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3628</tr> 3629</tbody> 3630</table></div> 3631</div> 3632<hr> 3633<div class="refsect2" lang="en"> 3634<h3> 3635<a name="xmlNewDocText"></a>xmlNewDocText ()</h3> 3636<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocText (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3637</pre> 3638<p>Create a new text node.</p> 3639<div class="variablelist"><table border="0"> 3640<col align="left"> 3641<tbody> 3642<tr> 3643<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3644<td>the target document</td> 3645</tr> 3646<tr> 3647<td><span class="term"><i><tt>content</tt></i>:</span></td> 3648<td>raw text content (optional)</td> 3649</tr> 3650<tr> 3651<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3652<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3653</tr> 3654</tbody> 3655</table></div> 3656</div> 3657<hr> 3658<div class="refsect2" lang="en"> 3659<h3> 3660<a name="xmlNewDocTextLen"></a>xmlNewDocTextLen ()</h3> 3661<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewDocTextLen (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 3662</pre> 3663<p>Create a new text node.</p> 3664<div class="variablelist"><table border="0"> 3665<col align="left"> 3666<tbody> 3667<tr> 3668<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3669<td>the target document</td> 3670</tr> 3671<tr> 3672<td><span class="term"><i><tt>content</tt></i>:</span></td> 3673<td>raw text content (optional)</td> 3674</tr> 3675<tr> 3676<td><span class="term"><i><tt>len</tt></i>:</span></td> 3677<td>size of text content</td> 3678</tr> 3679<tr> 3680<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3681<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3682</tr> 3683</tbody> 3684</table></div> 3685</div> 3686<hr> 3687<div class="refsect2" lang="en"> 3688<h3> 3689<a name="xmlNewDtd"></a>xmlNewDtd ()</h3> 3690<pre class="programlisting"><a href="libxml2-tree.html#xmlDtdPtr">xmlDtdPtr</a> xmlNewDtd (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * ExternalID, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * SystemID)<br> 3691</pre> 3692<p>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().</p> 3693<div class="variablelist"><table border="0"> 3694<col align="left"> 3695<tbody> 3696<tr> 3697<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3698<td>the document pointer (optional)</td> 3699</tr> 3700<tr> 3701<td><span class="term"><i><tt>name</tt></i>:</span></td> 3702<td>the DTD name (optional)</td> 3703</tr> 3704<tr> 3705<td><span class="term"><i><tt>ExternalID</tt></i>:</span></td> 3706<td>the external ID (optional)</td> 3707</tr> 3708<tr> 3709<td><span class="term"><i><tt>SystemID</tt></i>:</span></td> 3710<td>the system ID (optional)</td> 3711</tr> 3712<tr> 3713<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3714<td>a pointer to the new DTD object or NULL if arguments are invalid or a memory allocation failed.</td> 3715</tr> 3716</tbody> 3717</table></div> 3718</div> 3719<hr> 3720<div class="refsect2" lang="en"> 3721<h3> 3722<a name="xmlNewGlobalNs"></a>xmlNewGlobalNs ()</h3> 3723<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewGlobalNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br> 3724</pre> 3725<p>Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!</p> 3726<div class="variablelist"><table border="0"> 3727<col align="left"> 3728<tbody> 3729<tr> 3730<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3731<td>the document carrying the namespace</td> 3732</tr> 3733<tr> 3734<td><span class="term"><i><tt>href</tt></i>:</span></td> 3735<td>the URI associated</td> 3736</tr> 3737<tr> 3738<td><span class="term"><i><tt>prefix</tt></i>:</span></td> 3739<td>the prefix for the namespace</td> 3740</tr> 3741<tr> 3742<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3743<td>NULL this functionality had been removed</td> 3744</tr> 3745</tbody> 3746</table></div> 3747</div> 3748<hr> 3749<div class="refsect2" lang="en"> 3750<h3> 3751<a name="xmlNewNode"></a>xmlNewNode ()</h3> 3752<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNode (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3753</pre> 3754<p>Create an element node. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocNode">xmlNewDocNode</a>.</p> 3755<div class="variablelist"><table border="0"> 3756<col align="left"> 3757<tbody> 3758<tr> 3759<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3760<td>namespace (optional)</td> 3761</tr> 3762<tr> 3763<td><span class="term"><i><tt>name</tt></i>:</span></td> 3764<td>the node name</td> 3765</tr> 3766<tr> 3767<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3768<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3769</tr> 3770</tbody> 3771</table></div> 3772</div> 3773<hr> 3774<div class="refsect2" lang="en"> 3775<h3> 3776<a name="xmlNewNodeEatName"></a>xmlNewNodeEatName ()</h3> 3777<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewNodeEatName (<a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3778</pre> 3779<p>Create an element node. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocNodeEatName">xmlNewDocNodeEatName</a>. 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.</p> 3780<div class="variablelist"><table border="0"> 3781<col align="left"> 3782<tbody> 3783<tr> 3784<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3785<td>namespace (optional)</td> 3786</tr> 3787<tr> 3788<td><span class="term"><i><tt>name</tt></i>:</span></td> 3789<td>the node name</td> 3790</tr> 3791<tr> 3792<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3793<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3794</tr> 3795</tbody> 3796</table></div> 3797</div> 3798<hr> 3799<div class="refsect2" lang="en"> 3800<h3> 3801<a name="xmlNewNs"></a>xmlNewNs ()</h3> 3802<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlNewNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * prefix)<br> 3803</pre> 3804<p>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.</p> 3805<div class="variablelist"><table border="0"> 3806<col align="left"> 3807<tbody> 3808<tr> 3809<td><span class="term"><i><tt>node</tt></i>:</span></td> 3810<td>the element carrying the namespace (optional)</td> 3811</tr> 3812<tr> 3813<td><span class="term"><i><tt>href</tt></i>:</span></td> 3814<td>the URI associated</td> 3815</tr> 3816<tr> 3817<td><span class="term"><i><tt>prefix</tt></i>:</span></td> 3818<td>the prefix for the namespace (optional)</td> 3819</tr> 3820<tr> 3821<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3822<td>a new namespace pointer or NULL if arguments are invalid, the prefix is already in use or a memory allocation failed.</td> 3823</tr> 3824</tbody> 3825</table></div> 3826</div> 3827<hr> 3828<div class="refsect2" lang="en"> 3829<h3> 3830<a name="xmlNewNsProp"></a>xmlNewNsProp ()</h3> 3831<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 3832</pre> 3833<p>Create an <a href="libxml2-SAX.html#attribute">attribute</a> object. If provided, @value should be a raw, unescaped string. If @node is provided, the created <a href="libxml2-SAX.html#attribute">attribute</a> will be appended without checking for duplicate names. It is an error if @node is not an element.</p> 3834<div class="variablelist"><table border="0"> 3835<col align="left"> 3836<tbody> 3837<tr> 3838<td><span class="term"><i><tt>node</tt></i>:</span></td> 3839<td>the parent node (optional)</td> 3840</tr> 3841<tr> 3842<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3843<td>the namespace (optional)</td> 3844</tr> 3845<tr> 3846<td><span class="term"><i><tt>name</tt></i>:</span></td> 3847<td>the local name of the <a href="libxml2-SAX.html#attribute">attribute</a> 3848</td> 3849</tr> 3850<tr> 3851<td><span class="term"><i><tt>value</tt></i>:</span></td> 3852<td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a> (optional)</td> 3853</tr> 3854<tr> 3855<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3856<td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a> or NULL if arguments are invalid or a memory allocation failed.</td> 3857</tr> 3858</tbody> 3859</table></div> 3860</div> 3861<hr> 3862<div class="refsect2" lang="en"> 3863<h3> 3864<a name="xmlNewNsPropEatName"></a>xmlNewNsPropEatName ()</h3> 3865<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewNsPropEatName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 3866</pre> 3867<p>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.</p> 3868<div class="variablelist"><table border="0"> 3869<col align="left"> 3870<tbody> 3871<tr> 3872<td><span class="term"><i><tt>node</tt></i>:</span></td> 3873<td>the parent node (optional)</td> 3874</tr> 3875<tr> 3876<td><span class="term"><i><tt>ns</tt></i>:</span></td> 3877<td>the namespace (optional)</td> 3878</tr> 3879<tr> 3880<td><span class="term"><i><tt>name</tt></i>:</span></td> 3881<td>the local name of the <a href="libxml2-SAX.html#attribute">attribute</a> 3882</td> 3883</tr> 3884<tr> 3885<td><span class="term"><i><tt>value</tt></i>:</span></td> 3886<td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a> (optional)</td> 3887</tr> 3888<tr> 3889<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3890<td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a> or NULL if arguments are invalid or a memory allocation failed.</td> 3891</tr> 3892</tbody> 3893</table></div> 3894</div> 3895<hr> 3896<div class="refsect2" lang="en"> 3897<h3> 3898<a name="xmlNewPI"></a>xmlNewPI ()</h3> 3899<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewPI (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3900</pre> 3901<p>Create a processing instruction node. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocPI">xmlNewDocPI</a>.</p> 3902<div class="variablelist"><table border="0"> 3903<col align="left"> 3904<tbody> 3905<tr> 3906<td><span class="term"><i><tt>name</tt></i>:</span></td> 3907<td>the processing instruction target</td> 3908</tr> 3909<tr> 3910<td><span class="term"><i><tt>content</tt></i>:</span></td> 3911<td>the PI content (optional)</td> 3912</tr> 3913<tr> 3914<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3915<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3916</tr> 3917</tbody> 3918</table></div> 3919</div> 3920<hr> 3921<div class="refsect2" lang="en"> 3922<h3> 3923<a name="xmlNewProp"></a>xmlNewProp ()</h3> 3924<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlNewProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 3925</pre> 3926<p>Create an <a href="libxml2-SAX.html#attribute">attribute</a> node. If provided, @value should be a raw, unescaped string. If @node is provided, the created <a href="libxml2-SAX.html#attribute">attribute</a> will be appended without checking for duplicate names. It is an error if @node is not an element.</p> 3927<div class="variablelist"><table border="0"> 3928<col align="left"> 3929<tbody> 3930<tr> 3931<td><span class="term"><i><tt>node</tt></i>:</span></td> 3932<td>the parent node (optional)</td> 3933</tr> 3934<tr> 3935<td><span class="term"><i><tt>name</tt></i>:</span></td> 3936<td>the name of the <a href="libxml2-SAX.html#attribute">attribute</a> 3937</td> 3938</tr> 3939<tr> 3940<td><span class="term"><i><tt>value</tt></i>:</span></td> 3941<td>the value of the <a href="libxml2-SAX.html#attribute">attribute</a> (optional)</td> 3942</tr> 3943<tr> 3944<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3945<td>a pointer to the <a href="libxml2-SAX.html#attribute">attribute</a> or NULL if arguments are invalid or a memory allocation failed.</td> 3946</tr> 3947</tbody> 3948</table></div> 3949</div> 3950<hr> 3951<div class="refsect2" lang="en"> 3952<h3> 3953<a name="xmlNewReference"></a>xmlNewReference ()</h3> 3954<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewReference (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 3955</pre> 3956<p>Create a new entity <a href="libxml2-SAX.html#reference">reference</a> node, linking the result with the entity in @doc if found. Entity names like '&entity;' are handled as well.</p> 3957<div class="variablelist"><table border="0"> 3958<col align="left"> 3959<tbody> 3960<tr> 3961<td><span class="term"><i><tt>doc</tt></i>:</span></td> 3962<td>the target document (optional)</td> 3963</tr> 3964<tr> 3965<td><span class="term"><i><tt>name</tt></i>:</span></td> 3966<td>the entity name</td> 3967</tr> 3968<tr> 3969<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3970<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 3971</tr> 3972</tbody> 3973</table></div> 3974</div> 3975<hr> 3976<div class="refsect2" lang="en"> 3977<h3> 3978<a name="xmlNewText"></a>xmlNewText ()</h3> 3979<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewText (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 3980</pre> 3981<p>Create a text node. Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocText">xmlNewDocText</a>.</p> 3982<div class="variablelist"><table border="0"> 3983<col align="left"> 3984<tbody> 3985<tr> 3986<td><span class="term"><i><tt>content</tt></i>:</span></td> 3987<td>raw text content (optional)</td> 3988</tr> 3989<tr> 3990<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 3991<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 3992</tr> 3993</tbody> 3994</table></div> 3995</div> 3996<hr> 3997<div class="refsect2" lang="en"> 3998<h3> 3999<a name="xmlNewTextChild"></a>xmlNewTextChild ()</h3> 4000<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextChild (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> parent, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 4001</pre> 4002<p>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 <a href="libxml2-tree.html#xmlNewDocRawNode">xmlNewDocRawNode</a>.</p> 4003<div class="variablelist"><table border="0"> 4004<col align="left"> 4005<tbody> 4006<tr> 4007<td><span class="term"><i><tt>parent</tt></i>:</span></td> 4008<td>the parent node</td> 4009</tr> 4010<tr> 4011<td><span class="term"><i><tt>ns</tt></i>:</span></td> 4012<td>a namespace (optional)</td> 4013</tr> 4014<tr> 4015<td><span class="term"><i><tt>name</tt></i>:</span></td> 4016<td>the name of the child</td> 4017</tr> 4018<tr> 4019<td><span class="term"><i><tt>content</tt></i>:</span></td> 4020<td>raw text content of the child (optional)</td> 4021</tr> 4022<tr> 4023<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4024<td>a pointer to the new node object or NULL if arguments are invalid or a memory allocation failed.</td> 4025</tr> 4026</tbody> 4027</table></div> 4028</div> 4029<hr> 4030<div class="refsect2" lang="en"> 4031<h3> 4032<a name="xmlNewTextLen"></a>xmlNewTextLen ()</h3> 4033<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNewTextLen (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 4034</pre> 4035<p>Use of this function is DISCOURAGED in favor of <a href="libxml2-tree.html#xmlNewDocTextLen">xmlNewDocTextLen</a>.</p> 4036<div class="variablelist"><table border="0"> 4037<col align="left"> 4038<tbody> 4039<tr> 4040<td><span class="term"><i><tt>content</tt></i>:</span></td> 4041<td>raw text content (optional)</td> 4042</tr> 4043<tr> 4044<td><span class="term"><i><tt>len</tt></i>:</span></td> 4045<td>size of text content</td> 4046</tr> 4047<tr> 4048<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4049<td>a pointer to the new node object or NULL if a memory allocation failed.</td> 4050</tr> 4051</tbody> 4052</table></div> 4053</div> 4054<hr> 4055<div class="refsect2" lang="en"> 4056<h3> 4057<a name="xmlNextElementSibling"></a>xmlNextElementSibling ()</h3> 4058<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlNextElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 4059</pre> 4060<p>Find the closest following sibling which is a element. Note that entity references are not expanded.</p> 4061<div class="variablelist"><table border="0"> 4062<col align="left"> 4063<tbody> 4064<tr> 4065<td><span class="term"><i><tt>node</tt></i>:</span></td> 4066<td>the current node</td> 4067</tr> 4068<tr> 4069<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4070<td>the sibling or NULL if no sibling was found.</td> 4071</tr> 4072</tbody> 4073</table></div> 4074</div> 4075<hr> 4076<div class="refsect2" lang="en"> 4077<h3> 4078<a name="xmlNodeAddContent"></a>xmlNodeAddContent ()</h3> 4079<pre class="programlisting">int xmlNodeAddContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 4080</pre> 4081<p>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.</p> 4082<div class="variablelist"><table border="0"> 4083<col align="left"> 4084<tbody> 4085<tr> 4086<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4087<td>the node being modified</td> 4088</tr> 4089<tr> 4090<td><span class="term"><i><tt>content</tt></i>:</span></td> 4091<td>extra content</td> 4092</tr> 4093<tr> 4094<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4095<td>0 on success, 1 on error, -1 if a memory allocation failed.</td> 4096</tr> 4097</tbody> 4098</table></div> 4099</div> 4100<hr> 4101<div class="refsect2" lang="en"> 4102<h3> 4103<a name="xmlNodeAddContentLen"></a>xmlNodeAddContentLen ()</h3> 4104<pre class="programlisting">int xmlNodeAddContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 4105</pre> 4106<p>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.</p> 4107<div class="variablelist"><table border="0"> 4108<col align="left"> 4109<tbody> 4110<tr> 4111<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4112<td>the node being modified</td> 4113</tr> 4114<tr> 4115<td><span class="term"><i><tt>content</tt></i>:</span></td> 4116<td>extra content</td> 4117</tr> 4118<tr> 4119<td><span class="term"><i><tt>len</tt></i>:</span></td> 4120<td>the size of @content</td> 4121</tr> 4122<tr> 4123<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4124<td>0 on success, 1 on error, -1 if a memory allocation failed.</td> 4125</tr> 4126</tbody> 4127</table></div> 4128</div> 4129<hr> 4130<div class="refsect2" lang="en"> 4131<h3> 4132<a name="xmlNodeBufGetContent"></a>xmlNodeBufGetContent ()</h3> 4133<pre class="programlisting">int xmlNodeBufGetContent (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buffer, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 4134</pre> 4135<p>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</p> 4136<div class="variablelist"><table border="0"> 4137<col align="left"> 4138<tbody> 4139<tr> 4140<td><span class="term"><i><tt>buffer</tt></i>:</span></td> 4141<td>a buffer</td> 4142</tr> 4143<tr> 4144<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4145<td>the node being read</td> 4146</tr> 4147<tr> 4148<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4149<td>0 in case of success and -1 in case of error.</td> 4150</tr> 4151</tbody> 4152</table></div> 4153</div> 4154<hr> 4155<div class="refsect2" lang="en"> 4156<h3> 4157<a name="xmlNodeDump"></a>xmlNodeDump ()</h3> 4158<pre class="programlisting">int xmlNodeDump (<a href="libxml2-tree.html#xmlBufferPtr">xmlBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format)<br> 4159</pre> 4160<p>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 <a href="libxml2-tree.html#xmlBuffer">xmlBuffer</a> structures it is limited to 2GB and somehow deprecated, use xmlNodeDumpOutput() instead.</p> 4161<div class="variablelist"><table border="0"> 4162<col align="left"> 4163<tbody> 4164<tr> 4165<td><span class="term"><i><tt>buf</tt></i>:</span></td> 4166<td>the XML buffer output</td> 4167</tr> 4168<tr> 4169<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4170<td>the document</td> 4171</tr> 4172<tr> 4173<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4174<td>the current node</td> 4175</tr> 4176<tr> 4177<td><span class="term"><i><tt>level</tt></i>:</span></td> 4178<td>the imbrication level for indenting</td> 4179</tr> 4180<tr> 4181<td><span class="term"><i><tt>format</tt></i>:</span></td> 4182<td>is formatting allowed</td> 4183</tr> 4184<tr> 4185<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4186<td>the number of bytes written to the buffer or -1 in case of error</td> 4187</tr> 4188</tbody> 4189</table></div> 4190</div> 4191<hr> 4192<div class="refsect2" lang="en"> 4193<h3> 4194<a name="xmlNodeDumpOutput"></a>xmlNodeDumpOutput ()</h3> 4195<pre class="programlisting">void xmlNodeDumpOutput (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int level, <br> int format, <br> const char * encoding)<br> 4196</pre> 4197<p>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</p> 4198<div class="variablelist"><table border="0"> 4199<col align="left"> 4200<tbody> 4201<tr> 4202<td><span class="term"><i><tt>buf</tt></i>:</span></td> 4203<td>the XML buffer output</td> 4204</tr> 4205<tr> 4206<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4207<td>the document</td> 4208</tr> 4209<tr> 4210<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4211<td>the current node</td> 4212</tr> 4213<tr> 4214<td><span class="term"><i><tt>level</tt></i>:</span></td> 4215<td>the imbrication level for indenting</td> 4216</tr> 4217<tr> 4218<td><span class="term"><i><tt>format</tt></i>:</span></td> 4219<td>is formatting allowed</td> 4220</tr> 4221<tr> 4222<td><span class="term"><i><tt>encoding</tt></i>:</span></td> 4223<td>an optional encoding string</td> 4224</tr> 4225</tbody> 4226</table></div> 4227</div> 4228<hr> 4229<div class="refsect2" lang="en"> 4230<h3> 4231<a name="xmlNodeGetAttrValue"></a>xmlNodeGetAttrValue ()</h3> 4232<pre class="programlisting">int xmlNodeGetAttrValue (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nsUri, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** out)<br> 4233</pre> 4234<p>Search and get the value of an <a href="libxml2-SAX.html#attribute">attribute</a> associated to a node This <a href="libxml2-SAX.html#attribute">attribute</a> 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.</p> 4235<div class="variablelist"><table border="0"> 4236<col align="left"> 4237<tbody> 4238<tr> 4239<td><span class="term"><i><tt>node</tt></i>:</span></td> 4240<td>the node</td> 4241</tr> 4242<tr> 4243<td><span class="term"><i><tt>name</tt></i>:</span></td> 4244<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 4245</tr> 4246<tr> 4247<td><span class="term"><i><tt>nsUri</tt></i>:</span></td> 4248<td>the URI of the namespace</td> 4249</tr> 4250<tr> 4251<td><span class="term"><i><tt>out</tt></i>:</span></td> 4252<td>the returned string</td> 4253</tr> 4254<tr> 4255<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4256<td>0 on success, 1 if no <a href="libxml2-SAX.html#attribute">attribute</a> was found, -1 if a memory allocation failed.</td> 4257</tr> 4258</tbody> 4259</table></div> 4260</div> 4261<hr> 4262<div class="refsect2" lang="en"> 4263<h3> 4264<a name="xmlNodeGetBase"></a>xmlNodeGetBase ()</h3> 4265<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetBase (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 4266</pre> 4267<p>See <a href="libxml2-tree.html#xmlNodeGetBaseSafe">xmlNodeGetBaseSafe</a>. This function doesn't allow to distinguish memory allocation failures from a non-existing base.</p> 4268<div class="variablelist"><table border="0"> 4269<col align="left"> 4270<tbody> 4271<tr> 4272<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4273<td>the document the node pertains to</td> 4274</tr> 4275<tr> 4276<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4277<td>the node being checked</td> 4278</tr> 4279<tr> 4280<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4281<td>a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree().</td> 4282</tr> 4283</tbody> 4284</table></div> 4285</div> 4286<hr> 4287<div class="refsect2" lang="en"> 4288<h3> 4289<a name="xmlNodeGetBaseSafe"></a>xmlNodeGetBaseSafe ()</h3> 4290<pre class="programlisting">int xmlNodeGetBaseSafe (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** baseOut)<br> 4291</pre> 4292<p>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.</p> 4293<div class="variablelist"><table border="0"> 4294<col align="left"> 4295<tbody> 4296<tr> 4297<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4298<td>the document the node pertains to</td> 4299</tr> 4300<tr> 4301<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4302<td>the node being checked</td> 4303</tr> 4304<tr> 4305<td><span class="term"><i><tt>baseOut</tt></i>:</span></td> 4306<td>pointer to base</td> 4307</tr> 4308<tr> 4309<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4310<td>0 in case of success, 1 if a URI or argument is invalid, -1 if a memory allocation failed.</td> 4311</tr> 4312</tbody> 4313</table></div> 4314</div> 4315<hr> 4316<div class="refsect2" lang="en"> 4317<h3> 4318<a name="xmlNodeGetContent"></a>xmlNodeGetContent ()</h3> 4319<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetContent (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 4320</pre> 4321<p>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.</p> 4322<div class="variablelist"><table border="0"> 4323<col align="left"> 4324<tbody> 4325<tr> 4326<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4327<td>the node being read</td> 4328</tr> 4329<tr> 4330<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4331<td>a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree().</td> 4332</tr> 4333</tbody> 4334</table></div> 4335</div> 4336<hr> 4337<div class="refsect2" lang="en"> 4338<h3> 4339<a name="xmlNodeGetLang"></a>xmlNodeGetLang ()</h3> 4340<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeGetLang (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 4341</pre> 4342<p>Searches the language of a node, i.e. the values of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p> 4343<div class="variablelist"><table border="0"> 4344<col align="left"> 4345<tbody> 4346<tr> 4347<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4348<td>the node being checked</td> 4349</tr> 4350<tr> 4351<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4352<td>a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree().</td> 4353</tr> 4354</tbody> 4355</table></div> 4356</div> 4357<hr> 4358<div class="refsect2" lang="en"> 4359<h3> 4360<a name="xmlNodeGetSpacePreserve"></a>xmlNodeGetSpacePreserve ()</h3> 4361<pre class="programlisting">int xmlNodeGetSpacePreserve (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * cur)<br> 4362</pre> 4363<p>Searches the space preserving behaviour of a node, i.e. the values of the xml:space <a href="libxml2-SAX.html#attribute">attribute</a> or the one carried by the nearest ancestor.</p> 4364<div class="variablelist"><table border="0"> 4365<col align="left"> 4366<tbody> 4367<tr> 4368<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4369<td>the node being checked</td> 4370</tr> 4371<tr> 4372<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4373<td>-1 if xml:space is not inherited, 0 if "default", 1 if "preserve"</td> 4374</tr> 4375</tbody> 4376</table></div> 4377</div> 4378<hr> 4379<div class="refsect2" lang="en"> 4380<h3> 4381<a name="xmlNodeIsText"></a>xmlNodeIsText ()</h3> 4382<pre class="programlisting">int xmlNodeIsText (const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * node)<br> 4383</pre> 4384<p>Is this node a Text node ?</p> 4385<div class="variablelist"><table border="0"> 4386<col align="left"> 4387<tbody> 4388<tr> 4389<td><span class="term"><i><tt>node</tt></i>:</span></td> 4390<td>the node</td> 4391</tr> 4392<tr> 4393<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4394<td>1 yes, 0 no</td> 4395</tr> 4396</tbody> 4397</table></div> 4398</div> 4399<hr> 4400<div class="refsect2" lang="en"> 4401<h3> 4402<a name="xmlNodeListGetRawString"></a>xmlNodeListGetRawString ()</h3> 4403<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetRawString (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br> int inLine)<br> 4404</pre> 4405<p>Serializes <a href="libxml2-SAX.html#attribute">attribute</a> children (text and entity <a href="libxml2-SAX.html#reference">reference</a> nodes) into a string. An empty list produces an empty string. If @inLine is true, entity references will be substituted. Otherwise, entity references will be kept and special <a href="libxml2-SAX.html#characters">characters</a> like '&' will be escaped.</p> 4406<div class="variablelist"><table border="0"> 4407<col align="left"> 4408<tbody> 4409<tr> 4410<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4411<td>a document (optional)</td> 4412</tr> 4413<tr> 4414<td><span class="term"><i><tt>list</tt></i>:</span></td> 4415<td>a node list of <a href="libxml2-SAX.html#attribute">attribute</a> children (optional)</td> 4416</tr> 4417<tr> 4418<td><span class="term"><i><tt>inLine</tt></i>:</span></td> 4419<td>whether entity references are substituted</td> 4420</tr> 4421<tr> 4422<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4423<td>a string or NULL if a memory allocation failed.</td> 4424</tr> 4425</tbody> 4426</table></div> 4427</div> 4428<hr> 4429<div class="refsect2" lang="en"> 4430<h3> 4431<a name="xmlNodeListGetString"></a>xmlNodeListGetString ()</h3> 4432<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlNodeListGetString (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> const <a href="libxml2-tree.html#xmlNode">xmlNode</a> * list, <br> int inLine)<br> 4433</pre> 4434<p>Serializes <a href="libxml2-SAX.html#attribute">attribute</a> children (text and entity <a href="libxml2-SAX.html#reference">reference</a> nodes) into a string. An empty list produces an empty string. If @inLine is true, entity references will be substituted. Otherwise, entity references will be kept and special <a href="libxml2-SAX.html#characters">characters</a> like '&' as well as non-ASCII chars will be escaped. See <a href="libxml2-tree.html#xmlNodeListGetRawString">xmlNodeListGetRawString</a> for an alternative option.</p> 4435<div class="variablelist"><table border="0"> 4436<col align="left"> 4437<tbody> 4438<tr> 4439<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4440<td>a document (optional)</td> 4441</tr> 4442<tr> 4443<td><span class="term"><i><tt>list</tt></i>:</span></td> 4444<td>a node list of <a href="libxml2-SAX.html#attribute">attribute</a> children (optional)</td> 4445</tr> 4446<tr> 4447<td><span class="term"><i><tt>inLine</tt></i>:</span></td> 4448<td>whether entity references are substituted</td> 4449</tr> 4450<tr> 4451<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4452<td>a string or NULL if a memory allocation failed.</td> 4453</tr> 4454</tbody> 4455</table></div> 4456</div> 4457<hr> 4458<div class="refsect2" lang="en"> 4459<h3> 4460<a name="xmlNodeSetBase"></a>xmlNodeSetBase ()</h3> 4461<pre class="programlisting">int xmlNodeSetBase (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * uri)<br> 4462</pre> 4463<p>Set (or reset) the base URI of a node, i.e. the value of the xml:base <a href="libxml2-SAX.html#attribute">attribute</a>.</p> 4464<div class="variablelist"><table border="0"> 4465<col align="left"> 4466<tbody> 4467<tr> 4468<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4469<td>the node being changed</td> 4470</tr> 4471<tr> 4472<td><span class="term"><i><tt>uri</tt></i>:</span></td> 4473<td>the new base URI</td> 4474</tr> 4475<tr> 4476<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4477<td>0 on success, -1 on error.</td> 4478</tr> 4479</tbody> 4480</table></div> 4481</div> 4482<hr> 4483<div class="refsect2" lang="en"> 4484<h3> 4485<a name="xmlNodeSetContent"></a>xmlNodeSetContent ()</h3> 4486<pre class="programlisting">int xmlNodeSetContent (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content)<br> 4487</pre> 4488<p>Replace the text content of a node. Sets the raw text content of text, CDATA, <a href="libxml2-SAX.html#comment">comment</a> or PI nodes. For element and <a href="libxml2-SAX.html#attribute">attribute</a> nodes, removes all children and replaces them by parsing @content which is expected to be a valid XML <a href="libxml2-SAX.html#attribute">attribute</a> 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 <a href="libxml2-entities.html#xmlEncodeSpecialChars">xmlEncodeSpecialChars</a> 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, <a href="libxml2-tree.html#xmlNodeAddContent">xmlNodeAddContent</a> accepts raw text.</p> 4489<div class="variablelist"><table border="0"> 4490<col align="left"> 4491<tbody> 4492<tr> 4493<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4494<td>the node being modified</td> 4495</tr> 4496<tr> 4497<td><span class="term"><i><tt>content</tt></i>:</span></td> 4498<td>the new value of the content</td> 4499</tr> 4500<tr> 4501<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4502<td>0 on success, 1 on error, -1 if a memory allocation failed.</td> 4503</tr> 4504</tbody> 4505</table></div> 4506</div> 4507<hr> 4508<div class="refsect2" lang="en"> 4509<h3> 4510<a name="xmlNodeSetContentLen"></a>xmlNodeSetContentLen ()</h3> 4511<pre class="programlisting">int xmlNodeSetContentLen (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 4512</pre> 4513<p>See <a href="libxml2-tree.html#xmlNodeSetContent">xmlNodeSetContent</a>.</p> 4514<div class="variablelist"><table border="0"> 4515<col align="left"> 4516<tbody> 4517<tr> 4518<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4519<td>the node being modified</td> 4520</tr> 4521<tr> 4522<td><span class="term"><i><tt>content</tt></i>:</span></td> 4523<td>the new value of the content</td> 4524</tr> 4525<tr> 4526<td><span class="term"><i><tt>len</tt></i>:</span></td> 4527<td>the size of @content</td> 4528</tr> 4529<tr> 4530<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4531<td>0 on success, 1 on error, -1 if a memory allocation failed.</td> 4532</tr> 4533</tbody> 4534</table></div> 4535</div> 4536<hr> 4537<div class="refsect2" lang="en"> 4538<h3> 4539<a name="xmlNodeSetLang"></a>xmlNodeSetLang ()</h3> 4540<pre class="programlisting">int xmlNodeSetLang (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * lang)<br> 4541</pre> 4542<p>Set the language of a node, i.e. the values of the xml:lang <a href="libxml2-SAX.html#attribute">attribute</a>.</p> 4543<div class="variablelist"><table border="0"> 4544<col align="left"> 4545<tbody> 4546<tr> 4547<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4548<td>the node being changed</td> 4549</tr> 4550<tr> 4551<td><span class="term"><i><tt>lang</tt></i>:</span></td> 4552<td>the language description</td> 4553</tr> 4554<tr> 4555<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4556<td>0 on success, 1 if arguments are invalid, -1 if a memory allocation failed.</td> 4557</tr> 4558</tbody> 4559</table></div> 4560</div> 4561<hr> 4562<div class="refsect2" lang="en"> 4563<h3> 4564<a name="xmlNodeSetName"></a>xmlNodeSetName ()</h3> 4565<pre class="programlisting">void xmlNodeSetName (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 4566</pre> 4567<p>Set (or reset) the name of a node.</p> 4568<div class="variablelist"><table border="0"> 4569<col align="left"> 4570<tbody> 4571<tr> 4572<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4573<td>the node being changed</td> 4574</tr> 4575<tr> 4576<td><span class="term"><i><tt>name</tt></i>:</span></td> 4577<td>the new tag name</td> 4578</tr> 4579</tbody> 4580</table></div> 4581</div> 4582<hr> 4583<div class="refsect2" lang="en"> 4584<h3> 4585<a name="xmlNodeSetSpacePreserve"></a>xmlNodeSetSpacePreserve ()</h3> 4586<pre class="programlisting">int xmlNodeSetSpacePreserve (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur, <br> int val)<br> 4587</pre> 4588<p>Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space <a href="libxml2-SAX.html#attribute">attribute</a>.</p> 4589<div class="variablelist"><table border="0"> 4590<col align="left"> 4591<tbody> 4592<tr> 4593<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4594<td>the node being changed</td> 4595</tr> 4596<tr> 4597<td><span class="term"><i><tt>val</tt></i>:</span></td> 4598<td>the xml:space value ("0": default, 1: "preserve")</td> 4599</tr> 4600<tr> 4601<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4602<td>0 on success, 1 if arguments are invalid, -1 if a memory allocation failed.</td> 4603</tr> 4604</tbody> 4605</table></div> 4606</div> 4607<hr> 4608<div class="refsect2" lang="en"> 4609<h3> 4610<a name="xmlPreviousElementSibling"></a>xmlPreviousElementSibling ()</h3> 4611<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlPreviousElementSibling (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node)<br> 4612</pre> 4613<p>Find the closest preceding sibling which is a element. Note that entity references are not expanded.</p> 4614<div class="variablelist"><table border="0"> 4615<col align="left"> 4616<tbody> 4617<tr> 4618<td><span class="term"><i><tt>node</tt></i>:</span></td> 4619<td>the current node</td> 4620</tr> 4621<tr> 4622<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4623<td>the sibling or NULL if no sibling was found.</td> 4624</tr> 4625</tbody> 4626</table></div> 4627</div> 4628<hr> 4629<div class="refsect2" lang="en"> 4630<h3> 4631<a name="xmlReconciliateNs"></a>xmlReconciliateNs ()</h3> 4632<pre class="programlisting">int xmlReconciliateNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree)<br> 4633</pre> 4634<p>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.</p> 4635<div class="variablelist"><table border="0"> 4636<col align="left"> 4637<tbody> 4638<tr> 4639<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4640<td>the document</td> 4641</tr> 4642<tr> 4643<td><span class="term"><i><tt>tree</tt></i>:</span></td> 4644<td>a node defining the subtree to reconciliate</td> 4645</tr> 4646<tr> 4647<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4648<td>0 on success or -1 in case of error.</td> 4649</tr> 4650</tbody> 4651</table></div> 4652</div> 4653<hr> 4654<div class="refsect2" lang="en"> 4655<h3> 4656<a name="xmlRegisterNodeDefault"></a>xmlRegisterNodeDefault ()</h3> 4657<pre class="programlisting"><a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlRegisterNodeDefault (<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br> 4658</pre> 4659<p>DEPRECATED: don't use Registers a callback for node creation</p> 4660<div class="variablelist"><table border="0"> 4661<col align="left"> 4662<tbody> 4663<tr> 4664<td><span class="term"><i><tt>func</tt></i>:</span></td> 4665<td>function pointer to the new RegisterNodeFunc</td> 4666</tr> 4667<tr> 4668<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4669<td>the old value of the registration function</td> 4670</tr> 4671</tbody> 4672</table></div> 4673</div> 4674<hr> 4675<div class="refsect2" lang="en"> 4676<h3> 4677<a name="xmlRemoveProp"></a>xmlRemoveProp ()</h3> 4678<pre class="programlisting">int xmlRemoveProp (<a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> cur)<br> 4679</pre> 4680<p>Unlink and free an <a href="libxml2-SAX.html#attribute">attribute</a> including all children. Note this doesn't work for namespace declarations. The <a href="libxml2-SAX.html#attribute">attribute</a> must have a non-NULL parent pointer.</p> 4681<div class="variablelist"><table border="0"> 4682<col align="left"> 4683<tbody> 4684<tr> 4685<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4686<td>an <a href="libxml2-SAX.html#attribute">attribute</a> 4687</td> 4688</tr> 4689<tr> 4690<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4691<td>0 on success or -1 if the <a href="libxml2-SAX.html#attribute">attribute</a> was not found or arguments are invalid.</td> 4692</tr> 4693</tbody> 4694</table></div> 4695</div> 4696<hr> 4697<div class="refsect2" lang="en"> 4698<h3> 4699<a name="xmlReplaceNode"></a>xmlReplaceNode ()</h3> 4700<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlReplaceNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> old, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 4701</pre> 4702<p>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 <a href="libxml2-tree.html#xmlAddChild">xmlAddChild</a>.</p> 4703<div class="variablelist"><table border="0"> 4704<col align="left"> 4705<tbody> 4706<tr> 4707<td><span class="term"><i><tt>old</tt></i>:</span></td> 4708<td>the old node</td> 4709</tr> 4710<tr> 4711<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4712<td>the node (optional)</td> 4713</tr> 4714<tr> 4715<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4716<td>@old or NULL if arguments are invalid or a memory allocation failed.</td> 4717</tr> 4718</tbody> 4719</table></div> 4720</div> 4721<hr> 4722<div class="refsect2" lang="en"> 4723<h3> 4724<a name="xmlSaveFile"></a>xmlSaveFile ()</h3> 4725<pre class="programlisting">int xmlSaveFile (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur)<br> 4726</pre> 4727<p>Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.</p> 4728<div class="variablelist"><table border="0"> 4729<col align="left"> 4730<tbody> 4731<tr> 4732<td><span class="term"><i><tt>filename</tt></i>:</span></td> 4733<td>the filename (or URL)</td> 4734</tr> 4735<tr> 4736<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4737<td>the document</td> 4738</tr> 4739<tr> 4740<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4741<td>the number of bytes written or -1 in case of failure.</td> 4742</tr> 4743</tbody> 4744</table></div> 4745</div> 4746<hr> 4747<div class="refsect2" lang="en"> 4748<h3> 4749<a name="xmlSaveFileEnc"></a>xmlSaveFileEnc ()</h3> 4750<pre class="programlisting">int xmlSaveFileEnc (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding)<br> 4751</pre> 4752<p>Dump an XML document, converting it to the given encoding</p> 4753<div class="variablelist"><table border="0"> 4754<col align="left"> 4755<tbody> 4756<tr> 4757<td><span class="term"><i><tt>filename</tt></i>:</span></td> 4758<td>the filename (or URL)</td> 4759</tr> 4760<tr> 4761<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4762<td>the document</td> 4763</tr> 4764<tr> 4765<td><span class="term"><i><tt>encoding</tt></i>:</span></td> 4766<td>the name of an encoding (or NULL)</td> 4767</tr> 4768<tr> 4769<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4770<td>the number of bytes written or -1 in case of failure.</td> 4771</tr> 4772</tbody> 4773</table></div> 4774</div> 4775<hr> 4776<div class="refsect2" lang="en"> 4777<h3> 4778<a name="xmlSaveFileTo"></a>xmlSaveFileTo ()</h3> 4779<pre class="programlisting">int xmlSaveFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding)<br> 4780</pre> 4781<p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p> 4782<div class="variablelist"><table border="0"> 4783<col align="left"> 4784<tbody> 4785<tr> 4786<td><span class="term"><i><tt>buf</tt></i>:</span></td> 4787<td>an output I/O buffer</td> 4788</tr> 4789<tr> 4790<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4791<td>the document</td> 4792</tr> 4793<tr> 4794<td><span class="term"><i><tt>encoding</tt></i>:</span></td> 4795<td>the encoding if any assuming the I/O layer handles the transcoding</td> 4796</tr> 4797<tr> 4798<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4799<td>the number of bytes written or -1 in case of failure.</td> 4800</tr> 4801</tbody> 4802</table></div> 4803</div> 4804<hr> 4805<div class="refsect2" lang="en"> 4806<h3> 4807<a name="xmlSaveFormatFile"></a>xmlSaveFormatFile ()</h3> 4808<pre class="programlisting">int xmlSaveFormatFile (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> int format)<br> 4809</pre> 4810<p>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</p> 4811<div class="variablelist"><table border="0"> 4812<col align="left"> 4813<tbody> 4814<tr> 4815<td><span class="term"><i><tt>filename</tt></i>:</span></td> 4816<td>the filename (or URL)</td> 4817</tr> 4818<tr> 4819<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4820<td>the document</td> 4821</tr> 4822<tr> 4823<td><span class="term"><i><tt>format</tt></i>:</span></td> 4824<td>should formatting spaces been added</td> 4825</tr> 4826<tr> 4827<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4828<td>the number of bytes written or -1 in case of failure.</td> 4829</tr> 4830</tbody> 4831</table></div> 4832</div> 4833<hr> 4834<div class="refsect2" lang="en"> 4835<h3> 4836<a name="xmlSaveFormatFileEnc"></a>xmlSaveFormatFileEnc ()</h3> 4837<pre class="programlisting">int xmlSaveFormatFileEnc (const char * filename, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding, <br> int format)<br> 4838</pre> 4839<p>Dump an XML document to a file or an URL.</p> 4840<div class="variablelist"><table border="0"> 4841<col align="left"> 4842<tbody> 4843<tr> 4844<td><span class="term"><i><tt>filename</tt></i>:</span></td> 4845<td>the filename or URL to output</td> 4846</tr> 4847<tr> 4848<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4849<td>the document being saved</td> 4850</tr> 4851<tr> 4852<td><span class="term"><i><tt>encoding</tt></i>:</span></td> 4853<td>the name of the encoding to use or NULL.</td> 4854</tr> 4855<tr> 4856<td><span class="term"><i><tt>format</tt></i>:</span></td> 4857<td>should formatting spaces be added.</td> 4858</tr> 4859<tr> 4860<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4861<td>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</td> 4862</tr> 4863</tbody> 4864</table></div> 4865</div> 4866<hr> 4867<div class="refsect2" lang="en"> 4868<h3> 4869<a name="xmlSaveFormatFileTo"></a>xmlSaveFormatFileTo ()</h3> 4870<pre class="programlisting">int xmlSaveFormatFileTo (<a href="libxml2-tree.html#xmlOutputBufferPtr">xmlOutputBufferPtr</a> buf, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> cur, <br> const char * encoding, <br> int format)<br> 4871</pre> 4872<p>Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.</p> 4873<div class="variablelist"><table border="0"> 4874<col align="left"> 4875<tbody> 4876<tr> 4877<td><span class="term"><i><tt>buf</tt></i>:</span></td> 4878<td>an output I/O buffer</td> 4879</tr> 4880<tr> 4881<td><span class="term"><i><tt>cur</tt></i>:</span></td> 4882<td>the document</td> 4883</tr> 4884<tr> 4885<td><span class="term"><i><tt>encoding</tt></i>:</span></td> 4886<td>the encoding if any assuming the I/O layer handles the transcoding</td> 4887</tr> 4888<tr> 4889<td><span class="term"><i><tt>format</tt></i>:</span></td> 4890<td>should formatting spaces been added</td> 4891</tr> 4892<tr> 4893<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4894<td>the number of bytes written or -1 in case of failure.</td> 4895</tr> 4896</tbody> 4897</table></div> 4898</div> 4899<hr> 4900<div class="refsect2" lang="en"> 4901<h3> 4902<a name="xmlSearchNs"></a>xmlSearchNs ()</h3> 4903<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNs (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * nameSpace)<br> 4904</pre> 4905<p>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.</p> 4906<div class="variablelist"><table border="0"> 4907<col align="left"> 4908<tbody> 4909<tr> 4910<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4911<td>the document</td> 4912</tr> 4913<tr> 4914<td><span class="term"><i><tt>node</tt></i>:</span></td> 4915<td>the current node</td> 4916</tr> 4917<tr> 4918<td><span class="term"><i><tt>nameSpace</tt></i>:</span></td> 4919<td>the namespace prefix</td> 4920</tr> 4921<tr> 4922<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4923<td>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.</td> 4924</tr> 4925</tbody> 4926</table></div> 4927</div> 4928<hr> 4929<div class="refsect2" lang="en"> 4930<h3> 4931<a name="xmlSearchNsByHref"></a>xmlSearchNsByHref ()</h3> 4932<pre class="programlisting"><a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> xmlSearchNsByHref (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * href)<br> 4933</pre> 4934<p>Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.</p> 4935<div class="variablelist"><table border="0"> 4936<col align="left"> 4937<tbody> 4938<tr> 4939<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4940<td>the document</td> 4941</tr> 4942<tr> 4943<td><span class="term"><i><tt>node</tt></i>:</span></td> 4944<td>the current node</td> 4945</tr> 4946<tr> 4947<td><span class="term"><i><tt>href</tt></i>:</span></td> 4948<td>the namespace value</td> 4949</tr> 4950<tr> 4951<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 4952<td>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.</td> 4953</tr> 4954</tbody> 4955</table></div> 4956</div> 4957<hr> 4958<div class="refsect2" lang="en"> 4959<h3> 4960<a name="xmlSetBufferAllocationScheme"></a>xmlSetBufferAllocationScheme ()</h3> 4961<pre class="programlisting">void xmlSetBufferAllocationScheme (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> scheme)<br> 4962</pre> 4963<p>Set the buffer allocation method. Types are <a href="libxml2-tree.html#XML_BUFFER_ALLOC_EXACT">XML_BUFFER_ALLOC_EXACT</a> - use exact sizes, keeps memory usage down <a href="libxml2-tree.html#XML_BUFFER_ALLOC_DOUBLEIT">XML_BUFFER_ALLOC_DOUBLEIT</a> - double buffer when extra needed, improves performance</p> 4964<div class="variablelist"><table border="0"> 4965<col align="left"> 4966<tbody><tr> 4967<td><span class="term"><i><tt>scheme</tt></i>:</span></td> 4968<td>allocation method to use</td> 4969</tr></tbody> 4970</table></div> 4971</div> 4972<hr> 4973<div class="refsect2" lang="en"> 4974<h3> 4975<a name="xmlSetCompressMode"></a>xmlSetCompressMode ()</h3> 4976<pre class="programlisting">void xmlSetCompressMode (int mode)<br> 4977</pre> 4978<p>DEPRECATED: Use <a href="libxml2-tree.html#xmlSetDocCompressMode">xmlSetDocCompressMode</a> set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p> 4979<div class="variablelist"><table border="0"> 4980<col align="left"> 4981<tbody><tr> 4982<td><span class="term"><i><tt>mode</tt></i>:</span></td> 4983<td>the compression ratio</td> 4984</tr></tbody> 4985</table></div> 4986</div> 4987<hr> 4988<div class="refsect2" lang="en"> 4989<h3> 4990<a name="xmlSetDocCompressMode"></a>xmlSetDocCompressMode ()</h3> 4991<pre class="programlisting">void xmlSetDocCompressMode (<a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc, <br> int mode)<br> 4992</pre> 4993<p>set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)</p> 4994<div class="variablelist"><table border="0"> 4995<col align="left"> 4996<tbody> 4997<tr> 4998<td><span class="term"><i><tt>doc</tt></i>:</span></td> 4999<td>the document</td> 5000</tr> 5001<tr> 5002<td><span class="term"><i><tt>mode</tt></i>:</span></td> 5003<td>the compression ratio</td> 5004</tr> 5005</tbody> 5006</table></div> 5007</div> 5008<hr> 5009<div class="refsect2" lang="en"> 5010<h3> 5011<a name="xmlSetListDoc"></a>xmlSetListDoc ()</h3> 5012<pre class="programlisting">int xmlSetListDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> list, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br> 5013</pre> 5014<p>Associate all subtrees in @list with a new document. Internal function, see <a href="libxml2-tree.html#xmlSetTreeDoc">xmlSetTreeDoc</a>.</p> 5015<div class="variablelist"><table border="0"> 5016<col align="left"> 5017<tbody> 5018<tr> 5019<td><span class="term"><i><tt>list</tt></i>:</span></td> 5020<td>a node list</td> 5021</tr> 5022<tr> 5023<td><span class="term"><i><tt>doc</tt></i>:</span></td> 5024<td>new document</td> 5025</tr> 5026<tr> 5027<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5028<td>0 on success. If a memory allocation fails, returns -1. All subtrees will be updated on failure but some strings may be lost.</td> 5029</tr> 5030</tbody> 5031</table></div> 5032</div> 5033<hr> 5034<div class="refsect2" lang="en"> 5035<h3> 5036<a name="xmlSetNs"></a>xmlSetNs ()</h3> 5037<pre class="programlisting">void xmlSetNs (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns)<br> 5038</pre> 5039<p>Set the namespace of an element or <a href="libxml2-SAX.html#attribute">attribute</a> node. Passing a NULL namespace unsets the namespace.</p> 5040<div class="variablelist"><table border="0"> 5041<col align="left"> 5042<tbody> 5043<tr> 5044<td><span class="term"><i><tt>node</tt></i>:</span></td> 5045<td>a node in the document</td> 5046</tr> 5047<tr> 5048<td><span class="term"><i><tt>ns</tt></i>:</span></td> 5049<td>a namespace pointer (optional)</td> 5050</tr> 5051</tbody> 5052</table></div> 5053</div> 5054<hr> 5055<div class="refsect2" lang="en"> 5056<h3> 5057<a name="xmlSetNsProp"></a>xmlSetNsProp ()</h3> 5058<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 5059</pre> 5060<p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. The ns structure must be in scope, this is not checked</p> 5061<div class="variablelist"><table border="0"> 5062<col align="left"> 5063<tbody> 5064<tr> 5065<td><span class="term"><i><tt>node</tt></i>:</span></td> 5066<td>the node</td> 5067</tr> 5068<tr> 5069<td><span class="term"><i><tt>ns</tt></i>:</span></td> 5070<td>the namespace definition</td> 5071</tr> 5072<tr> 5073<td><span class="term"><i><tt>name</tt></i>:</span></td> 5074<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 5075</tr> 5076<tr> 5077<td><span class="term"><i><tt>value</tt></i>:</span></td> 5078<td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td> 5079</tr> 5080<tr> 5081<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5082<td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td> 5083</tr> 5084</tbody> 5085</table></div> 5086</div> 5087<hr> 5088<div class="refsect2" lang="en"> 5089<h3> 5090<a name="xmlSetProp"></a>xmlSetProp ()</h3> 5091<pre class="programlisting"><a href="libxml2-tree.html#xmlAttrPtr">xmlAttrPtr</a> xmlSetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 5092</pre> 5093<p>Set (or reset) an <a href="libxml2-SAX.html#attribute">attribute</a> 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.</p> 5094<div class="variablelist"><table border="0"> 5095<col align="left"> 5096<tbody> 5097<tr> 5098<td><span class="term"><i><tt>node</tt></i>:</span></td> 5099<td>the node</td> 5100</tr> 5101<tr> 5102<td><span class="term"><i><tt>name</tt></i>:</span></td> 5103<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name (a QName)</td> 5104</tr> 5105<tr> 5106<td><span class="term"><i><tt>value</tt></i>:</span></td> 5107<td>the <a href="libxml2-SAX.html#attribute">attribute</a> value</td> 5108</tr> 5109<tr> 5110<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5111<td>the <a href="libxml2-SAX.html#attribute">attribute</a> pointer.</td> 5112</tr> 5113</tbody> 5114</table></div> 5115</div> 5116<hr> 5117<div class="refsect2" lang="en"> 5118<h3> 5119<a name="xmlSetTreeDoc"></a>xmlSetTreeDoc ()</h3> 5120<pre class="programlisting">int xmlSetTreeDoc (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> tree, <br> <a href="libxml2-tree.html#xmlDocPtr">xmlDocPtr</a> doc)<br> 5121</pre> 5122<p>This is an internal function which shouldn't be used. It is invoked by functions like xmlAddChild, <a href="libxml2-tree.html#xmlAddSibling">xmlAddSibling</a> or <a href="libxml2-tree.html#xmlReplaceNode">xmlReplaceNode</a>. @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.</p> 5123<div class="variablelist"><table border="0"> 5124<col align="left"> 5125<tbody> 5126<tr> 5127<td><span class="term"><i><tt>tree</tt></i>:</span></td> 5128<td>root of a subtree</td> 5129</tr> 5130<tr> 5131<td><span class="term"><i><tt>doc</tt></i>:</span></td> 5132<td>new document</td> 5133</tr> 5134<tr> 5135<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5136<td>0 on success. If a memory allocation fails, returns -1. The whole tree will be updated on failure but some strings may be lost.</td> 5137</tr> 5138</tbody> 5139</table></div> 5140</div> 5141<hr> 5142<div class="refsect2" lang="en"> 5143<h3> 5144<a name="xmlSplitQName2"></a>xmlSplitQName2 ()</h3> 5145<pre class="programlisting"><a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName2 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> ** prefix)<br> 5146</pre> 5147<p>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</p> 5148<div class="variablelist"><table border="0"> 5149<col align="left"> 5150<tbody> 5151<tr> 5152<td><span class="term"><i><tt>name</tt></i>:</span></td> 5153<td>the full QName</td> 5154</tr> 5155<tr> 5156<td><span class="term"><i><tt>prefix</tt></i>:</span></td> 5157<td>a <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> **</td> 5158</tr> 5159<tr> 5160<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5161<td>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.</td> 5162</tr> 5163</tbody> 5164</table></div> 5165</div> 5166<hr> 5167<div class="refsect2" lang="en"> 5168<h3> 5169<a name="xmlSplitQName3"></a>xmlSplitQName3 ()</h3> 5170<pre class="programlisting">const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * xmlSplitQName3 (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name, <br> int * len)<br> 5171</pre> 5172<p>parse an XML qualified name string,i</p> 5173<div class="variablelist"><table border="0"> 5174<col align="left"> 5175<tbody> 5176<tr> 5177<td><span class="term"><i><tt>name</tt></i>:</span></td> 5178<td>the full QName</td> 5179</tr> 5180<tr> 5181<td><span class="term"><i><tt>len</tt></i>:</span></td> 5182<td>an int *</td> 5183</tr> 5184<tr> 5185<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5186<td>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</td> 5187</tr> 5188</tbody> 5189</table></div> 5190</div> 5191<hr> 5192<div class="refsect2" lang="en"> 5193<h3> 5194<a name="xmlStringGetNodeList"></a>xmlStringGetNodeList ()</h3> 5195<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringGetNodeList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value)<br> 5196</pre> 5197<p>DEPRECATED: Use <a href="libxml2-tree.html#xmlNodeSetContent">xmlNodeSetContent</a>. Parse an <a href="libxml2-SAX.html#attribute">attribute</a> value and build a node list containing only text and entity <a href="libxml2-SAX.html#reference">reference</a> 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.</p> 5198<div class="variablelist"><table border="0"> 5199<col align="left"> 5200<tbody> 5201<tr> 5202<td><span class="term"><i><tt>doc</tt></i>:</span></td> 5203<td>a document (optional)</td> 5204</tr> 5205<tr> 5206<td><span class="term"><i><tt>value</tt></i>:</span></td> 5207<td>an <a href="libxml2-SAX.html#attribute">attribute</a> value</td> 5208</tr> 5209<tr> 5210<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5211<td>a pointer to the first child or NULL if a memory allocation failed.</td> 5212</tr> 5213</tbody> 5214</table></div> 5215</div> 5216<hr> 5217<div class="refsect2" lang="en"> 5218<h3> 5219<a name="xmlStringLenGetNodeList"></a>xmlStringLenGetNodeList ()</h3> 5220<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlStringLenGetNodeList (const <a href="libxml2-tree.html#xmlDoc">xmlDoc</a> * doc, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int len)<br> 5221</pre> 5222<p>DEPRECATED: Use <a href="libxml2-tree.html#xmlNodeSetContentLen">xmlNodeSetContentLen</a>. See <a href="libxml2-tree.html#xmlStringGetNodeList">xmlStringGetNodeList</a>.</p> 5223<div class="variablelist"><table border="0"> 5224<col align="left"> 5225<tbody> 5226<tr> 5227<td><span class="term"><i><tt>doc</tt></i>:</span></td> 5228<td>a document (optional)</td> 5229</tr> 5230<tr> 5231<td><span class="term"><i><tt>value</tt></i>:</span></td> 5232<td>an <a href="libxml2-SAX.html#attribute">attribute</a> value</td> 5233</tr> 5234<tr> 5235<td><span class="term"><i><tt>len</tt></i>:</span></td> 5236<td>maximum length of the <a href="libxml2-SAX.html#attribute">attribute</a> value</td> 5237</tr> 5238<tr> 5239<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5240<td>a pointer to the first child or NULL if a memory allocation failed.</td> 5241</tr> 5242</tbody> 5243</table></div> 5244</div> 5245<hr> 5246<div class="refsect2" lang="en"> 5247<h3> 5248<a name="xmlTextConcat"></a>xmlTextConcat ()</h3> 5249<pre class="programlisting">int xmlTextConcat (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * content, <br> int len)<br> 5250</pre> 5251<p>Concat the given string at the end of the existing node content. If @len is -1, the string length will be calculated.</p> 5252<div class="variablelist"><table border="0"> 5253<col align="left"> 5254<tbody> 5255<tr> 5256<td><span class="term"><i><tt>node</tt></i>:</span></td> 5257<td>the node</td> 5258</tr> 5259<tr> 5260<td><span class="term"><i><tt>content</tt></i>:</span></td> 5261<td>the content</td> 5262</tr> 5263<tr> 5264<td><span class="term"><i><tt>len</tt></i>:</span></td> 5265<td>@content length</td> 5266</tr> 5267<tr> 5268<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5269<td>-1 in case of error, 0 otherwise</td> 5270</tr> 5271</tbody> 5272</table></div> 5273</div> 5274<hr> 5275<div class="refsect2" lang="en"> 5276<h3> 5277<a name="xmlTextMerge"></a>xmlTextMerge ()</h3> 5278<pre class="programlisting"><a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> xmlTextMerge (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> first, <br> <a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> second)<br> 5279</pre> 5280<p>Merge the second text node into the first. The second node is unlinked and freed.</p> 5281<div class="variablelist"><table border="0"> 5282<col align="left"> 5283<tbody> 5284<tr> 5285<td><span class="term"><i><tt>first</tt></i>:</span></td> 5286<td>the first text node</td> 5287</tr> 5288<tr> 5289<td><span class="term"><i><tt>second</tt></i>:</span></td> 5290<td>the second text node being merged</td> 5291</tr> 5292<tr> 5293<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5294<td>the first text node augmented or NULL in case of error.</td> 5295</tr> 5296</tbody> 5297</table></div> 5298</div> 5299<hr> 5300<div class="refsect2" lang="en"> 5301<h3> 5302<a name="xmlThrDefBufferAllocScheme"></a>xmlThrDefBufferAllocScheme ()</h3> 5303<pre class="programlisting"><a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> xmlThrDefBufferAllocScheme (<a href="libxml2-tree.html#xmlBufferAllocationScheme">xmlBufferAllocationScheme</a> v)<br> 5304</pre> 5305<p></p> 5306<div class="variablelist"><table border="0"> 5307<col align="left"> 5308<tbody> 5309<tr> 5310<td><span class="term"><i><tt>v</tt></i>:</span></td> 5311<td></td> 5312</tr> 5313<tr> 5314<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5315<td></td> 5316</tr> 5317</tbody> 5318</table></div> 5319</div> 5320<hr> 5321<div class="refsect2" lang="en"> 5322<h3> 5323<a name="xmlThrDefDefaultBufferSize"></a>xmlThrDefDefaultBufferSize ()</h3> 5324<pre class="programlisting">int xmlThrDefDefaultBufferSize (int v)<br> 5325</pre> 5326<p></p> 5327<div class="variablelist"><table border="0"> 5328<col align="left"> 5329<tbody> 5330<tr> 5331<td><span class="term"><i><tt>v</tt></i>:</span></td> 5332<td></td> 5333</tr> 5334<tr> 5335<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5336<td></td> 5337</tr> 5338</tbody> 5339</table></div> 5340</div> 5341<hr> 5342<div class="refsect2" lang="en"> 5343<h3> 5344<a name="xmlThrDefDeregisterNodeDefault"></a>xmlThrDefDeregisterNodeDefault ()</h3> 5345<pre class="programlisting"><a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> xmlThrDefDeregisterNodeDefault (<a href="libxml2-tree.html#xmlDeregisterNodeFunc">xmlDeregisterNodeFunc</a> func)<br> 5346</pre> 5347<p></p> 5348<div class="variablelist"><table border="0"> 5349<col align="left"> 5350<tbody> 5351<tr> 5352<td><span class="term"><i><tt>func</tt></i>:</span></td> 5353<td></td> 5354</tr> 5355<tr> 5356<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5357<td></td> 5358</tr> 5359</tbody> 5360</table></div> 5361</div> 5362<hr> 5363<div class="refsect2" lang="en"> 5364<h3> 5365<a name="xmlThrDefRegisterNodeDefault"></a>xmlThrDefRegisterNodeDefault ()</h3> 5366<pre class="programlisting"><a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> xmlThrDefRegisterNodeDefault (<a href="libxml2-tree.html#xmlRegisterNodeFunc">xmlRegisterNodeFunc</a> func)<br> 5367</pre> 5368<p></p> 5369<div class="variablelist"><table border="0"> 5370<col align="left"> 5371<tbody> 5372<tr> 5373<td><span class="term"><i><tt>func</tt></i>:</span></td> 5374<td></td> 5375</tr> 5376<tr> 5377<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5378<td></td> 5379</tr> 5380</tbody> 5381</table></div> 5382</div> 5383<hr> 5384<div class="refsect2" lang="en"> 5385<h3> 5386<a name="xmlUnlinkNode"></a>xmlUnlinkNode ()</h3> 5387<pre class="programlisting">void xmlUnlinkNode (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> cur)<br> 5388</pre> 5389<p>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 <a href="libxml2-tree.html#xmlFreeNode">xmlFreeNode</a>.</p> 5390<div class="variablelist"><table border="0"> 5391<col align="left"> 5392<tbody><tr> 5393<td><span class="term"><i><tt>cur</tt></i>:</span></td> 5394<td>the node</td> 5395</tr></tbody> 5396</table></div> 5397</div> 5398<hr> 5399<div class="refsect2" lang="en"> 5400<h3> 5401<a name="xmlUnsetNsProp"></a>xmlUnsetNsProp ()</h3> 5402<pre class="programlisting">int xmlUnsetNsProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> <a href="libxml2-tree.html#xmlNsPtr">xmlNsPtr</a> ns, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 5403</pre> 5404<p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node.</p> 5405<div class="variablelist"><table border="0"> 5406<col align="left"> 5407<tbody> 5408<tr> 5409<td><span class="term"><i><tt>node</tt></i>:</span></td> 5410<td>the node</td> 5411</tr> 5412<tr> 5413<td><span class="term"><i><tt>ns</tt></i>:</span></td> 5414<td>the namespace definition</td> 5415</tr> 5416<tr> 5417<td><span class="term"><i><tt>name</tt></i>:</span></td> 5418<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 5419</tr> 5420<tr> 5421<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5422<td>0 if successful, -1 if not found</td> 5423</tr> 5424</tbody> 5425</table></div> 5426</div> 5427<hr> 5428<div class="refsect2" lang="en"> 5429<h3> 5430<a name="xmlUnsetProp"></a>xmlUnsetProp ()</h3> 5431<pre class="programlisting">int xmlUnsetProp (<a href="libxml2-tree.html#xmlNodePtr">xmlNodePtr</a> node, <br> const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * name)<br> 5432</pre> 5433<p>Remove an <a href="libxml2-SAX.html#attribute">attribute</a> carried by a node. This handles only attributes in no namespace.</p> 5434<div class="variablelist"><table border="0"> 5435<col align="left"> 5436<tbody> 5437<tr> 5438<td><span class="term"><i><tt>node</tt></i>:</span></td> 5439<td>the node</td> 5440</tr> 5441<tr> 5442<td><span class="term"><i><tt>name</tt></i>:</span></td> 5443<td>the <a href="libxml2-SAX.html#attribute">attribute</a> name</td> 5444</tr> 5445<tr> 5446<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5447<td>0 if successful, -1 if not found</td> 5448</tr> 5449</tbody> 5450</table></div> 5451</div> 5452<hr> 5453<div class="refsect2" lang="en"> 5454<h3> 5455<a name="xmlValidateNCName"></a>xmlValidateNCName ()</h3> 5456<pre class="programlisting">int xmlValidateNCName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space)<br> 5457</pre> 5458<p>Check that a value conforms to the lexical space of NCName</p> 5459<div class="variablelist"><table border="0"> 5460<col align="left"> 5461<tbody> 5462<tr> 5463<td><span class="term"><i><tt>value</tt></i>:</span></td> 5464<td>the value to check</td> 5465</tr> 5466<tr> 5467<td><span class="term"><i><tt>space</tt></i>:</span></td> 5468<td>allow spaces in front and end of the string</td> 5469</tr> 5470<tr> 5471<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5472<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 5473</tr> 5474</tbody> 5475</table></div> 5476</div> 5477<hr> 5478<div class="refsect2" lang="en"> 5479<h3> 5480<a name="xmlValidateNMToken"></a>xmlValidateNMToken ()</h3> 5481<pre class="programlisting">int xmlValidateNMToken (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space)<br> 5482</pre> 5483<p>Check that a value conforms to the lexical space of NMToken</p> 5484<div class="variablelist"><table border="0"> 5485<col align="left"> 5486<tbody> 5487<tr> 5488<td><span class="term"><i><tt>value</tt></i>:</span></td> 5489<td>the value to check</td> 5490</tr> 5491<tr> 5492<td><span class="term"><i><tt>space</tt></i>:</span></td> 5493<td>allow spaces in front and end of the string</td> 5494</tr> 5495<tr> 5496<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5497<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 5498</tr> 5499</tbody> 5500</table></div> 5501</div> 5502<hr> 5503<div class="refsect2" lang="en"> 5504<h3> 5505<a name="xmlValidateName"></a>xmlValidateName ()</h3> 5506<pre class="programlisting">int xmlValidateName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space)<br> 5507</pre> 5508<p>Check that a value conforms to the lexical space of Name</p> 5509<div class="variablelist"><table border="0"> 5510<col align="left"> 5511<tbody> 5512<tr> 5513<td><span class="term"><i><tt>value</tt></i>:</span></td> 5514<td>the value to check</td> 5515</tr> 5516<tr> 5517<td><span class="term"><i><tt>space</tt></i>:</span></td> 5518<td>allow spaces in front and end of the string</td> 5519</tr> 5520<tr> 5521<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5522<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 5523</tr> 5524</tbody> 5525</table></div> 5526</div> 5527<hr> 5528<div class="refsect2" lang="en"> 5529<h3> 5530<a name="xmlValidateQName"></a>xmlValidateQName ()</h3> 5531<pre class="programlisting">int xmlValidateQName (const <a href="libxml2-xmlstring.html#xmlChar">xmlChar</a> * value, <br> int space)<br> 5532</pre> 5533<p>Check that a value conforms to the lexical space of QName</p> 5534<div class="variablelist"><table border="0"> 5535<col align="left"> 5536<tbody> 5537<tr> 5538<td><span class="term"><i><tt>value</tt></i>:</span></td> 5539<td>the value to check</td> 5540</tr> 5541<tr> 5542<td><span class="term"><i><tt>space</tt></i>:</span></td> 5543<td>allow spaces in front and end of the string</td> 5544</tr> 5545<tr> 5546<td><span class="term"><i><tt>Returns</tt></i>:</span></td> 5547<td>0 if this validates, a positive error code number otherwise and -1 in case of internal or API error.</td> 5548</tr> 5549</tbody> 5550</table></div> 5551</div> 5552<hr> 5553</div> 5554</div> 5555</body> 5556</html> 5557