deps/src/libxml2-2.9.1/doc/html/libxml-tree.html
| |
|
|
|
|
|
|
|
|
|
| API Menu | |
|
| API Indexes | |
|
| Related links | |
|
|
|
|
|
|
| | threads | | API documentation | | The XML C parser and toolkit of Gnome | uri | |
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
#define[BASE\_BUFFER\_SIZE](#BASE_BUFFER_SIZE)
#define[LIBXML2\_NEW\_BUFFER](#LIBXML2_NEW_BUFFER)
#define[XML\_GET\_CONTENT](#XML_GET_CONTENT)
#define[XML\_GET\_LINE](#XML_GET_LINE)
#define[XML\_LOCAL\_NAMESPACE](#XML_LOCAL_NAMESPACE)
#define[XML\_XML\_ID](#XML_XML_ID)
#define[XML\_XML\_NAMESPACE](#XML_XML_NAMESPACE)
#define[xmlChildrenNode](#xmlChildrenNode)
#define[xmlRootNode](#xmlRootNode)
Structure[xmlAttr](#xmlAttr)
struct _xmlAttr
Typedef[xmlAttr](libxml-tree.html#xmlAttr)*xmlAttrPtr
Structure[xmlAttribute](#xmlAttribute)
struct _xmlAttribute
Enum[xmlAttributeDefault](#xmlAttributeDefault)
Typedef[xmlAttribute](libxml-tree.html#xmlAttribute)*xmlAttributePtr
Enum[xmlAttributeType](#xmlAttributeType)
Structure[xmlBuf](#xmlBuf)
struct _xmlBuf
The content of this structure is not made public by the API.
Typedef[xmlBuf](libxml-tree.html#xmlBuf)*xmlBufPtr
Structure[xmlBuffer](#xmlBuffer)
struct _xmlBuffer
Enum[xmlBufferAllocationScheme](#xmlBufferAllocationScheme)
Typedef[xmlBuffer](libxml-tree.html#xmlBuffer)*xmlBufferPtr
Structure[xmlDOMWrapCtxt](#xmlDOMWrapCtxt)
struct _xmlDOMWrapCtxt
Typedef[xmlDOMWrapCtxt](libxml-tree.html#xmlDOMWrapCtxt)*xmlDOMWrapCtxtPtr
Structure[xmlDoc](#xmlDoc)
struct _xmlDoc
Enum[xmlDocProperties](#xmlDocProperties)
Typedef[xmlDoc](libxml-tree.html#xmlDoc)*xmlDocPtr
Structure[xmlDtd](#xmlDtd)
struct _xmlDtd
Typedef[xmlDtd](libxml-tree.html#xmlDtd)*xmlDtdPtr
Structure[xmlElement](#xmlElement)
struct _xmlElement
Structure[xmlElementContent](#xmlElementContent)
struct _xmlElementContent
Enum[xmlElementContentOccur](#xmlElementContentOccur)
Typedef[xmlElementContent](libxml-tree.html#xmlElementContent)*xmlElementContentPtr
Enum[xmlElementContentType](#xmlElementContentType)
Typedef[xmlElement](libxml-tree.html#xmlElement)*xmlElementPtr
Enum[xmlElementType](#xmlElementType)
Enum[xmlElementTypeVal](#xmlElementTypeVal)
Structure[xmlEntity](#xmlEntity)
struct _xmlEntity
Typedef[xmlEntity](libxml-tree.html#xmlEntity)*xmlEntityPtr
Structure[xmlEnumeration](#xmlEnumeration)
struct _xmlEnumeration
Typedef[xmlEnumeration](libxml-tree.html#xmlEnumeration)*xmlEnumerationPtr
Structure[xmlID](#xmlID)
struct _xmlID
Typedef[xmlID](libxml-tree.html#xmlID)*xmlIDPtr
Structure[xmlNode](#xmlNode)
struct _xmlNode
Typedef[xmlNode](libxml-tree.html#xmlNode)*xmlNodePtr
Structure[xmlNotation](#xmlNotation)
struct _xmlNotation
Typedef[xmlNotation](libxml-tree.html#xmlNotation)*xmlNotationPtr
Structure[xmlNs](#xmlNs)
struct _xmlNs
Typedef[xmlNs](libxml-tree.html#xmlNs)*xmlNsPtr
Typedef[xmlElementType](libxml-tree.html#xmlElementType)xmlNsType
Structure[xmlOutputBuffer](#xmlOutputBuffer)
struct _xmlOutputBuffer
Typedef[xmlOutputBuffer](libxml-tree.html#xmlOutputBuffer)*xmlOutputBufferPtr
Structure[xmlParserCtxt](#xmlParserCtxt)
struct _xmlParserCtxt
Typedef[xmlParserCtxt](libxml-tree.html#xmlParserCtxt)*xmlParserCtxtPtr
Structure[xmlParserInput](#xmlParserInput)
struct _xmlParserInput
Structure[xmlParserInputBuffer](#xmlParserInputBuffer)
struct _xmlParserInputBuffer
Typedef[xmlParserInputBuffer](libxml-tree.html#xmlParserInputBuffer)*xmlParserInputBufferPtr
Typedef[xmlParserInput](libxml-tree.html#xmlParserInput)*xmlParserInputPtr
Structure[xmlRef](#xmlRef)
struct _xmlRef
Typedef[xmlRef](libxml-tree.html#xmlRef)*xmlRefPtr
Structure[xmlSAXHandler](#xmlSAXHandler)
struct _xmlSAXHandler
Typedef[xmlSAXHandler](libxml-tree.html#xmlSAXHandler)*xmlSAXHandlerPtr
Structure[xmlSAXLocator](#xmlSAXLocator)
struct _xmlSAXLocator
Typedef[xmlSAXLocator](libxml-tree.html#xmlSAXLocator)*xmlSAXLocatorPtr
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlAddChild](#xmlAddChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlAddChildList](#xmlAddChildList)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlAddNextSibling](#xmlAddNextSibling)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlAddPrevSibling](#xmlAddPrevSibling)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlAddSibling](#xmlAddSibling)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
void[xmlAttrSerializeTxtContent](#xmlAttrSerializeTxtContent)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)attr,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlBufContent](#xmlBufContent)(const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlBufEnd](#xmlBufEnd)(const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
int[xmlBufGetNodeContent](#xmlBufGetNodeContent)([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
size_t[xmlBufNodeDump](#xmlBufNodeDump)([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format)
size_t[xmlBufShrink](#xmlBufShrink)([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
size_t len)
size_t[xmlBufUse](#xmlBufUse)(const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
int[xmlBufferAdd](#xmlBufferAdd)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
int len)
int[xmlBufferAddHead](#xmlBufferAddHead)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
int len)
int[xmlBufferCCat](#xmlBufferCCat)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const char * str)
int[xmlBufferCat](#xmlBufferCat)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str)
const[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlBufferContent](#xmlBufferContent)(const[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)[xmlBufferCreate](#xmlBufferCreate)(void)
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)[xmlBufferCreateSize](#xmlBufferCreateSize)(size_t size)
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)[xmlBufferCreateStatic](#xmlBufferCreateStatic)(void * mem,
size_t size)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlBufferDetach](#xmlBufferDetach)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
int[xmlBufferDump](#xmlBufferDump)(FILE * file,
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
void[xmlBufferEmpty](#xmlBufferEmpty)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
void[xmlBufferFree](#xmlBufferFree)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
int[xmlBufferGrow](#xmlBufferGrow)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int len)
int[xmlBufferLength](#xmlBufferLength)(const[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
int[xmlBufferResize](#xmlBufferResize)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int size)
void[xmlBufferSetAllocationScheme](#xmlBufferSetAllocationScheme)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)scheme)
int[xmlBufferShrink](#xmlBufferShrink)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int len)
void[xmlBufferWriteCHAR](#xmlBufferWriteCHAR)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
void[xmlBufferWriteChar](#xmlBufferWriteChar)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const char * string)
void[xmlBufferWriteQuotedString](#xmlBufferWriteQuotedString)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlBuildQName](#xmlBuildQName)(const[xmlChar](libxml-xmlstring.html#xmlChar)* ncname,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix,
[xmlChar](libxml-xmlstring.html#xmlChar)* memory,
int len)
unsigned long[xmlChildElementCount](#xmlChildElementCount)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
[xmlDocPtr](libxml-tree.html#xmlDocPtr)[xmlCopyDoc](#xmlCopyDoc)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int recursive)
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)[xmlCopyDtd](#xmlCopyDtd)([xmlDtdPtr](libxml-tree.html#xmlDtdPtr)dtd)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlCopyNamespace](#xmlCopyNamespace)([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlCopyNamespaceList](#xmlCopyNamespaceList)([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlCopyNode](#xmlCopyNode)(const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
int extended)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlCopyNodeList](#xmlCopyNodeList)(const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlCopyProp](#xmlCopyProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)target,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlCopyPropList](#xmlCopyPropList)([xmlNodePtr](libxml-tree.html#xmlNodePtr)target,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)[xmlCreateIntSubset](#xmlCreateIntSubset)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID)
Function type:[xmlDOMWrapAcquireNsFunction](#xmlDOMWrapAcquireNsFunction)[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlDOMWrapAcquireNsFunction](#xmlDOMWrapAcquireNsFunction)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nsName,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nsPrefix)
int[xmlDOMWrapAdoptNode](#xmlDOMWrapAdoptNode)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)sourceDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)destDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)destParent,
int options)
int[xmlDOMWrapCloneNode](#xmlDOMWrapCloneNode)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)sourceDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)* resNode,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)destDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)destParent,
int deep,
int options)
void[xmlDOMWrapFreeCtxt](#xmlDOMWrapFreeCtxt)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt)
[xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)[xmlDOMWrapNewCtxt](#xmlDOMWrapNewCtxt)(void)
int[xmlDOMWrapReconcileNamespaces](#xmlDOMWrapReconcileNamespaces)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem,
int options)
int[xmlDOMWrapRemoveNode](#xmlDOMWrapRemoveNode)([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
int options)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlDocCopyNode](#xmlDocCopyNode)(const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int extended)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlDocCopyNodeList](#xmlDocCopyNodeList)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
int[xmlDocDump](#xmlDocDump)(FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
void[xmlDocDumpFormatMemory](#xmlDocDumpFormatMemory)([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
[xmlChar](libxml-xmlstring.html#xmlChar)** mem,
int * size,
int format)
void[xmlDocDumpFormatMemoryEnc](#xmlDocDumpFormatMemoryEnc)([xmlDocPtr](libxml-tree.html#xmlDocPtr)out_doc,
[xmlChar](libxml-xmlstring.html#xmlChar)** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format)
void[xmlDocDumpMemory](#xmlDocDumpMemory)([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
[xmlChar](libxml-xmlstring.html#xmlChar)** mem,
int * size)
void[xmlDocDumpMemoryEnc](#xmlDocDumpMemoryEnc)([xmlDocPtr](libxml-tree.html#xmlDocPtr)out_doc,
[xmlChar](libxml-xmlstring.html#xmlChar)** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding)
int[xmlDocFormatDump](#xmlDocFormatDump)(FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
int format)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlDocGetRootElement](#xmlDocGetRootElement)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlDocSetRootElement](#xmlDocSetRootElement)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)root)
void[xmlElemDump](#xmlElemDump)(FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlFirstElementChild](#xmlFirstElementChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
void[xmlFreeDoc](#xmlFreeDoc)([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
void[xmlFreeDtd](#xmlFreeDtd)([xmlDtdPtr](libxml-tree.html#xmlDtdPtr)cur)
void[xmlFreeNode](#xmlFreeNode)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
void[xmlFreeNodeList](#xmlFreeNodeList)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
void[xmlFreeNs](#xmlFreeNs)([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
void[xmlFreeNsList](#xmlFreeNsList)([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
void[xmlFreeProp](#xmlFreeProp)([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
void[xmlFreePropList](#xmlFreePropList)([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
[xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)[xmlGetBufferAllocationScheme](#xmlGetBufferAllocationScheme)(void)
int[xmlGetCompressMode](#xmlGetCompressMode)(void)
int[xmlGetDocCompressMode](#xmlGetDocCompressMode)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)[xmlGetIntSubset](#xmlGetIntSubset)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlGetLastChild](#xmlGetLastChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
long[xmlGetLineNo](#xmlGetLineNo)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlGetNoNsProp](#xmlGetNoNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlGetNodePath](#xmlGetNodePath)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)*[xmlGetNsList](#xmlGetNsList)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlGetNsProp](#xmlGetNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlGetProp](#xmlGetProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlHasNsProp](#xmlHasNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlHasProp](#xmlHasProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
int[xmlIsBlankNode](#xmlIsBlankNode)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
int[xmlIsXHTML](#xmlIsXHTML)(const[xmlChar](libxml-xmlstring.html#xmlChar)* systemID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* publicID)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlLastElementChild](#xmlLastElementChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewCDataBlock](#xmlNewCDataBlock)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewCharRef](#xmlNewCharRef)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewChild](#xmlNewChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewComment](#xmlNewComment)(const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlDocPtr](libxml-tree.html#xmlDocPtr)[xmlNewDoc](#xmlNewDoc)(const[xmlChar](libxml-xmlstring.html#xmlChar)* version)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocComment](#xmlNewDocComment)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocFragment](#xmlNewDocFragment)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocNode](#xmlNewDocNode)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocNodeEatName](#xmlNewDocNodeEatName)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocPI](#xmlNewDocPI)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlNewDocProp](#xmlNewDocProp)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocRawNode](#xmlNewDocRawNode)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocText](#xmlNewDocText)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewDocTextLen](#xmlNewDocTextLen)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)[xmlNewDtd](#xmlNewDtd)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlNewGlobalNs](#xmlNewGlobalNs)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewNode](#xmlNewNode)([xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewNodeEatName](#xmlNewNodeEatName)([xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlNewNs](#xmlNewNs)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlNewNsProp](#xmlNewNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlNewNsPropEatName](#xmlNewNsPropEatName)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewPI](#xmlNewPI)(const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlNewProp](#xmlNewProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewReference](#xmlNewReference)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewText](#xmlNewText)(const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewTextChild](#xmlNewTextChild)([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNewTextLen](#xmlNewTextLen)(const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlNextElementSibling](#xmlNextElementSibling)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
void[xmlNodeAddContent](#xmlNodeAddContent)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
void[xmlNodeAddContentLen](#xmlNodeAddContentLen)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
int[xmlNodeBufGetContent](#xmlNodeBufGetContent)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buffer,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
int[xmlNodeDump](#xmlNodeDump)([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format)
void[xmlNodeDumpOutput](#xmlNodeDumpOutput)([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format,
const char * encoding)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlNodeGetBase](#xmlNodeGetBase)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlNodeGetContent](#xmlNodeGetContent)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlNodeGetLang](#xmlNodeGetLang)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
int[xmlNodeGetSpacePreserve](#xmlNodeGetSpacePreserve)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
int[xmlNodeIsText](#xmlNodeIsText)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlNodeListGetRawString](#xmlNodeListGetRawString)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
int inLine)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlNodeListGetString](#xmlNodeListGetString)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
int inLine)
void[xmlNodeSetBase](#xmlNodeSetBase)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* uri)
void[xmlNodeSetContent](#xmlNodeSetContent)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
void[xmlNodeSetContentLen](#xmlNodeSetContentLen)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
void[xmlNodeSetLang](#xmlNodeSetLang)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* lang)
void[xmlNodeSetName](#xmlNodeSetName)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
void[xmlNodeSetSpacePreserve](#xmlNodeSetSpacePreserve)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int val)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlPreviousElementSibling](#xmlPreviousElementSibling)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
int[xmlReconciliateNs](#xmlReconciliateNs)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)tree)
int[xmlRemoveProp](#xmlRemoveProp)([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlReplaceNode](#xmlReplaceNode)([xmlNodePtr](libxml-tree.html#xmlNodePtr)old,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
int[xmlSaveFile](#xmlSaveFile)(const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
int[xmlSaveFileEnc](#xmlSaveFileEnc)(const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding)
int[xmlSaveFileTo](#xmlSaveFileTo)([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding)
int[xmlSaveFormatFile](#xmlSaveFormatFile)(const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
int format)
int[xmlSaveFormatFileEnc](#xmlSaveFormatFileEnc)(const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding,
int format)
int[xmlSaveFormatFileTo](#xmlSaveFormatFileTo)([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding,
int format)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlSearchNs](#xmlSearchNs)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
[xmlNsPtr](libxml-tree.html#xmlNsPtr)[xmlSearchNsByHref](#xmlSearchNsByHref)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href)
void[xmlSetBufferAllocationScheme](#xmlSetBufferAllocationScheme)([xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)scheme)
void[xmlSetCompressMode](#xmlSetCompressMode)(int mode)
void[xmlSetDocCompressMode](#xmlSetDocCompressMode)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int mode)
void[xmlSetListDoc](#xmlSetListDoc)([xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
void[xmlSetNs](#xmlSetNs)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlSetNsProp](#xmlSetNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)[xmlSetProp](#xmlSetProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
void[xmlSetTreeDoc](#xmlSetTreeDoc)([xmlNodePtr](libxml-tree.html#xmlNodePtr)tree,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlSplitQName2](#xmlSplitQName2)(const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
[xmlChar](libxml-xmlstring.html#xmlChar)** prefix)
const[xmlChar](libxml-xmlstring.html#xmlChar)*[xmlSplitQName3](#xmlSplitQName3)(const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
int * len)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlStringGetNodeList](#xmlStringGetNodeList)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlStringLenGetNodeList](#xmlStringLenGetNodeList)([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int len)
int[xmlTextConcat](#xmlTextConcat)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
[xmlNodePtr](libxml-tree.html#xmlNodePtr)[xmlTextMerge](#xmlTextMerge)([xmlNodePtr](libxml-tree.html#xmlNodePtr)first,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)second)
void[xmlUnlinkNode](#xmlUnlinkNode)([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
int[xmlUnsetNsProp](#xmlUnsetNsProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
int[xmlUnsetProp](#xmlUnsetProp)([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
int[xmlValidateNCName](#xmlValidateNCName)(const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
int[xmlValidateNMToken](#xmlValidateNMToken)(const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
int[xmlValidateName](#xmlValidateName)(const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
int[xmlValidateQName](#xmlValidateQName)(const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
#define BASE_BUFFER_SIZE
default buffer size 4000.
#define LIBXML2_NEW_BUFFER
Macro used to express that the API use the new buffers for xmlParserInputBuffer and xmlOutputBuffer. The change was introduced in 2.9.0.
#define XML_GET_CONTENT
Macro to extract the content pointer of a node.
#define XML_GET_LINE
Macro to extract the line number of an element node.
#define XML_LOCAL_NAMESPACE
A namespace declaration node.
#define XML_XML_ID
This is the name for the special xml:id attribute
#define XML_XML_NAMESPACE
This is the namespace for the special xml: prefix predefined in the XML Namespace specification.
#define xmlChildrenNode
Macro for compatibility naming layer with libxml1. Maps to "children."
#define xmlRootNode
Macro for compatibility naming layer with libxml1. Maps to "children".
Structure xmlAttr
struct _xmlAttr {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_ATTRIBUTE_NODE, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : the name of the property
struct _xmlNode * children : the value of the property
struct _xmlNode * last : NULL
struct _xmlNode * parent : child->parent link
struct _xmlAttr * next : next sibling link
struct _xmlAttr * prev : previous sibling link
struct _xmlDoc * doc : the containing document[xmlNs](libxml-tree.html#xmlNs)* ns : pointer to the associated namespace[xmlAttributeType](libxml-tree.html#xmlAttributeType)atype : the[attribute](libxml-SAX.html#attribute)type if validating
void * psvi : for type/PSVI informations
}
Structure xmlAttribute
struct _xmlAttribute {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_ATTRIBUTE_DECL, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Attribute name
struct _xmlNode * children : NULL
struct _xmlNode * last : NULL
struct _xmlDtd * parent : -> DTD
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : the containing document
struct _xmlAttribute * nexth : next in hash table[xmlAttributeType](libxml-tree.html#xmlAttributeType)atype : The[attribute](libxml-SAX.html#attribute)type[xmlAttributeDefault](libxml-tree.html#xmlAttributeDefault)def : the default
const[xmlChar](libxml-xmlstring.html#xmlChar)* defaultValue : or the default value[xmlEnumerationPtr](libxml-tree.html#xmlEnumerationPtr)tree : or the enumeration tree if any
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix : the namespace prefix if any
const[xmlChar](libxml-xmlstring.html#xmlChar)* elem : Element holding the[attribute](libxml-SAX.html#attribute)}
Enum xmlAttributeDefault {XML\_ATTRIBUTE\_NONE= 1XML\_ATTRIBUTE\_REQUIRED= 2XML\_ATTRIBUTE\_IMPLIED= 3XML\_ATTRIBUTE\_FIXED= 4
}
Enum xmlAttributeType {XML\_ATTRIBUTE\_CDATA= 1XML\_ATTRIBUTE\_ID= 2XML\_ATTRIBUTE\_IDREF= 3XML\_ATTRIBUTE\_IDREFS= 4XML\_ATTRIBUTE\_ENTITY= 5XML\_ATTRIBUTE\_ENTITIES= 6XML\_ATTRIBUTE\_NMTOKEN= 7XML\_ATTRIBUTE\_NMTOKENS= 8XML\_ATTRIBUTE\_ENUMERATION= 9XML\_ATTRIBUTE\_NOTATION= 10
}
Structure xmlBuf
struct _xmlBuf {
The content of this structure is not made public by the API.
}
A pointer to a buffer structure, the actual structure internals are not public
Structure xmlBuffer
struct _xmlBuffer {[xmlChar](libxml-xmlstring.html#xmlChar)* content : The buffer content UTF8
unsigned int use : The buffer size used
unsigned int size : The buffer size[xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)alloc : The realloc method[xmlChar](libxml-xmlstring.html#xmlChar)* contentIO : in IO mode we may have a different base
}
Enum xmlBufferAllocationScheme {XML\_BUFFER\_ALLOC\_DOUBLEIT= 1 : double each time one need to growXML\_BUFFER\_ALLOC\_EXACT= 2 : grow only to the minimal sizeXML\_BUFFER\_ALLOC\_IMMUTABLE= 3 : immutable bufferXML\_BUFFER\_ALLOC\_IO= 4 : special allocation scheme used for I/OXML\_BUFFER\_ALLOC\_HYBRID= 5 : exact up to a threshold, and doubleit thereafter
}
Structure xmlDOMWrapCtxt
struct _xmlDOMWrapCtxt {
void * _private : * The type of this context, just in case
int type : * Internal namespace map used for variou
void * namespaceMap : * Use this one to acquire an[xmlNsPtr](libxml-tree.html#xmlNsPtr)in[xmlDOMWrapAcquireNsFunction](libxml-tree.html#xmlDOMWrapAcquireNsFunction)getNsForNodeFunc
}
Structure xmlDoc
struct _xmlDoc {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_DOCUMENT_NODE, must be second !
char * name : name/filename/URI of the document
struct _xmlNode * children : the document tree
struct _xmlNode * last : last child link
struct _xmlNode * parent : child->parent link
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : autoreference to itself End of common p
int compression : level of zlib compression
int standalone : standalone document (no external refs)
struct _xmlDtd * intSubset : the document internal subset
struct _xmlDtd * extSubset : the document external subset
struct _xmlNs * oldNs : Global namespace, the old way
const[xmlChar](libxml-xmlstring.html#xmlChar)* version : the XML version string
const[xmlChar](libxml-xmlstring.html#xmlChar)* encoding : external initial encoding, if any
void * ids : Hash table for ID attributes if any
void * refs : Hash table for IDREFs attributes if any
const[xmlChar](libxml-xmlstring.html#xmlChar)* URL : The URI for that document
int charset : encoding of the in-memory content actua
struct _xmlDict * dict : dict used to allocate names or NULL
void * psvi : for type/PSVI informations
int parseFlags : set of[xmlParserOption](libxml-parser.html#xmlParserOption)used to parse th
int properties : set of[xmlDocProperties](libxml-tree.html#xmlDocProperties)for this docume
}
Enum xmlDocProperties {XML\_DOC\_WELLFORMED= 1 : document is XML well formedXML\_DOC\_NSVALID= 2 : document is Namespace validXML\_DOC\_OLD10= 4 : parsed with old XML-1.0 parserXML\_DOC\_DTDVALID= 8 : DTD validation was successfulXML\_DOC\_XINCLUDE= 16 : XInclude substitution was doneXML\_DOC\_USERBUILT= 32 : Document was built using the API and not by parsing an instanceXML\_DOC\_INTERNAL= 64 : built for internal processingXML\_DOC\_HTML= 128 : parsed or built HTML document
}
Structure xmlDtd
struct _xmlDtd {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_DTD_NODE, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Name of the DTD
struct _xmlNode * children : the value of the property link
struct _xmlNode * last : last child link
struct _xmlDoc * parent : child->parent link
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : the containing document End of common p
void * notations : Hash table for notations if any
void * elements : Hash table for elements if any
void * attributes : Hash table for attributes if any
void * entities : Hash table for entities if any
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID : External identifier for PUBLIC DTD
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID : URI for a SYSTEM or PUBLIC DTD
void * pentities : Hash table for param entities if any
}
Structure xmlElement
struct _xmlElement {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_ELEMENT_DECL, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Element name
struct _xmlNode * children : NULL
struct _xmlNode * last : NULL
struct _xmlDtd * parent : -> DTD
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : the containing document[xmlElementTypeVal](libxml-tree.html#xmlElementTypeVal)etype : The type[xmlElementContentPtr](libxml-tree.html#xmlElementContentPtr)content : the allowed element content[xmlAttributePtr](libxml-tree.html#xmlAttributePtr)attributes : List of the declared attributes
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix : the namespace prefix if any[xmlRegexpPtr](libxml-xmlregexp.html#xmlRegexpPtr)contModel : the validating regexp
void * contModel
}
Structure xmlElementContent
struct _xmlElementContent {[xmlElementContentType](libxml-tree.html#xmlElementContentType)type : PCDATA, ELEMENT, SEQ or OR[xmlElementContentOccur](libxml-tree.html#xmlElementContentOccur)ocur : ONCE, OPT, MULT or PLUS
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Element name
struct _xmlElementContent * c1 : first child
struct _xmlElementContent * c2 : second child
struct _xmlElementContent * parent : parent
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix : Namespace prefix
}
Enum xmlElementContentOccur {XML\_ELEMENT\_CONTENT\_ONCE= 1XML\_ELEMENT\_CONTENT\_OPT= 2XML\_ELEMENT\_CONTENT\_MULT= 3XML\_ELEMENT\_CONTENT\_PLUS= 4
}
Enum xmlElementContentType {XML\_ELEMENT\_CONTENT\_PCDATA= 1XML\_ELEMENT\_CONTENT\_ELEMENT= 2XML\_ELEMENT\_CONTENT\_SEQ= 3XML\_ELEMENT\_CONTENT\_OR= 4
}
Enum xmlElementType {XML\_ELEMENT\_NODE= 1XML\_ATTRIBUTE\_NODE= 2XML\_TEXT\_NODE= 3XML\_CDATA\_SECTION\_NODE= 4XML\_ENTITY\_REF\_NODE= 5XML\_ENTITY\_NODE= 6XML\_PI\_NODE= 7XML\_COMMENT\_NODE= 8XML\_DOCUMENT\_NODE= 9XML\_DOCUMENT\_TYPE\_NODE= 10XML\_DOCUMENT\_FRAG\_NODE= 11XML\_NOTATION\_NODE= 12XML\_HTML\_DOCUMENT\_NODE= 13XML\_DTD\_NODE= 14XML\_ELEMENT\_DECL= 15XML\_ATTRIBUTE\_DECL= 16XML\_ENTITY\_DECL= 17XML\_NAMESPACE\_DECL= 18XML\_XINCLUDE\_START= 19XML\_XINCLUDE\_END= 20XML\_DOCB\_DOCUMENT\_NODE= 21
}
Enum xmlElementTypeVal {XML\_ELEMENT\_TYPE\_UNDEFINED= 0XML\_ELEMENT\_TYPE\_EMPTY= 1XML\_ELEMENT\_TYPE\_ANY= 2XML\_ELEMENT\_TYPE\_MIXED= 3XML\_ELEMENT\_TYPE\_ELEMENT= 4
}
Structure xmlEntity
struct _xmlEntity {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : XML_ENTITY_DECL, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Entity name
struct _xmlNode * children : First child link
struct _xmlNode * last : Last child link
struct _xmlDtd * parent : -> DTD
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : the containing document[xmlChar](libxml-xmlstring.html#xmlChar)* orig : content without ref substitution[xmlChar](libxml-xmlstring.html#xmlChar)* content : content or ndata if unparsed
int length : the content length[xmlEntityType](libxml-entities.html#xmlEntityType)etype : The entity type
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID : External identifier for PUBLIC
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID : URI for a SYSTEM or PUBLIC Entity
struct _xmlEntity * nexte : unused
const[xmlChar](libxml-xmlstring.html#xmlChar)* URI : the full URI as computed
int owner : does the entity own the childrens
int checked : was the entity content checked this is
}
Structure xmlEnumeration
struct _xmlEnumeration {
struct _xmlEnumeration * next : next one
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Enumeration name
}
Structure xmlID
struct _xmlID {
struct _xmlID * next : next ID
const[xmlChar](libxml-xmlstring.html#xmlChar)* value : The ID name[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)attr : The[attribute](libxml-SAX.html#attribute)holding it
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : The[attribute](libxml-SAX.html#attribute)if attr is not available
int lineno : The line number if attr is not availabl
struct _xmlDoc * doc : The document holding the ID
}
Structure xmlNode
struct _xmlNode {
void * _private : application data[xmlElementType](libxml-tree.html#xmlElementType)type : type number, must be second !
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : the name of the node, or the entity
struct _xmlNode * children : parent->childs link
struct _xmlNode * last : last child link
struct _xmlNode * parent : child->parent link
struct _xmlNode * next : next sibling link
struct _xmlNode * prev : previous sibling link
struct _xmlDoc * doc : the containing document End of common p[xmlNs](libxml-tree.html#xmlNs)* ns : pointer to the associated namespace[xmlChar](libxml-xmlstring.html#xmlChar)* content : the content
struct _xmlAttr * properties : properties list[xmlNs](libxml-tree.html#xmlNs)* nsDef : namespace definitions on this node
void * psvi : for type/PSVI informations
unsigned short line : line number
unsigned short extra : extra data for XPath/XSLT
}
Structure xmlNotation
struct _xmlNotation {
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Notation name
const[xmlChar](libxml-xmlstring.html#xmlChar)* PublicID : Public identifier, if any
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID : System identifier, if any
}
Structure xmlNs
struct _xmlNs {
struct _xmlNs * next : next Ns link for this node[xmlNsType](libxml-tree.html#xmlNsType)type : global or local
const[xmlChar](libxml-xmlstring.html#xmlChar)* href : URL for the namespace
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix : prefix for the namespace
void * _private : application data
struct _xmlDoc * context : normally an[xmlDoc](libxml-tree.html#xmlDoc)}
Structure xmlOutputBuffer
struct _xmlOutputBuffer {
void * context[xmlOutputWriteCallback](libxml-xmlIO.html#xmlOutputWriteCallback)writecallback[xmlOutputCloseCallback](libxml-xmlIO.html#xmlOutputCloseCallback)closecallback[xmlCharEncodingHandlerPtr](libxml-encoding.html#xmlCharEncodingHandlerPtr)encoder : I18N conversions to UTF-8[xmlBufPtr](libxml-tree.html#xmlBufPtr)buffer : Local buffer encoded in UTF-8 or ISOLat[xmlBufPtr](libxml-tree.html#xmlBufPtr)conv : if encoder != NULL buffer for output
int written : total number of byte written
int error
}
Structure xmlParserCtxt
struct _xmlParserCtxt {
struct _xmlSAXHandler * sax : The SAX handler
void * userData : For SAX interface only, used by DOM bui[xmlDocPtr](libxml-tree.html#xmlDocPtr)myDoc : the document being built
int wellFormed : is the document well formed
int replaceEntities : shall we replace entities ?
const[xmlChar](libxml-xmlstring.html#xmlChar)* version : the XML version string
const[xmlChar](libxml-xmlstring.html#xmlChar)* encoding : the declared encoding, if any
int standalone : standalone document
int html : an HTML(1)/Docbook(2) document * 3 is H[xmlParserInputPtr](libxml-tree.html#xmlParserInputPtr)input : Current input stream
int inputNr : Number of current input streams
int inputMax : Max number of input streams[xmlParserInputPtr](libxml-tree.html#xmlParserInputPtr)* inputTab : stack of inputs Node analysis stack onl[xmlNodePtr](libxml-tree.html#xmlNodePtr)node : Current parsed Node
int nodeNr : Depth of the parsing stack
int nodeMax : Max depth of the parsing stack[xmlNodePtr](libxml-tree.html#xmlNodePtr)* nodeTab : array of nodes
int record_info : Whether node info should be kept[xmlParserNodeInfoSeq](libxml-parser.html#xmlParserNodeInfoSeq)node_seq : info about each node parsed
int errNo : error code
int hasExternalSubset :[reference](libxml-SAX.html#reference)and external subset
int hasPErefs : the internal subset has PE refs
int external : are we parsing an external entity
int valid : is the document valid
int validate : shall we try to validate ?[xmlValidCtxt](libxml-valid.html#xmlValidCtxt)vctxt : The validity context[xmlParserInputState](libxml-parser.html#xmlParserInputState)instate : current type of input
int token : next char look-ahead
char * directory : the data directory Node name stack
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : Current parsed Node
int nameNr : Depth of the parsing stack
int nameMax : Max depth of the parsing stack
const[xmlChar](libxml-xmlstring.html#xmlChar)* * nameTab : array of nodes
long nbChars : number of[xmlChar](libxml-xmlstring.html#xmlChar)processed
long checkIndex : used by progressive parsing lookup
int keepBlanks : ugly but ...
int disableSAX : SAX callbacks are disabled
int inSubset : Parsing is in int 1/ext 2 subset
const[xmlChar](libxml-xmlstring.html#xmlChar)* intSubName : name of subset[xmlChar](libxml-xmlstring.html#xmlChar)* extSubURI : URI of external subset[xmlChar](libxml-xmlstring.html#xmlChar)* extSubSystem : SYSTEM ID of external subset xml:space
int * space : Should the parser preserve spaces
int spaceNr : Depth of the parsing stack
int spaceMax : Max depth of the parsing stack
int * spaceTab : array of space infos
int depth : to prevent entity substitution loops[xmlParserInputPtr](libxml-tree.html#xmlParserInputPtr)entity : used to check entities boundaries
int charset : encoding of the in-memory content actua
int nodelen : Those two fields are there to
int nodemem : Speed up large node parsing
int pedantic : signal pedantic warnings
void * _private : For user data, libxml won't touch it
int loadsubset : should the external subset be loaded
int linenumbers : set line number in element content
void * catalogs : document's own catalog
int recovery : run in recovery mode
int progressive : is this a progressive parsing[xmlDictPtr](libxml-dict.html#xmlDictPtr)dict : dictionnary for the parser
const[xmlChar](libxml-xmlstring.html#xmlChar)* * atts : array for the attributes callbacks
int maxatts : the size of the array
int docdict : * pre-interned strings *
const[xmlChar](libxml-xmlstring.html#xmlChar)* str_xml
const[xmlChar](libxml-xmlstring.html#xmlChar)* str_xmlns
const[xmlChar](libxml-xmlstring.html#xmlChar)* str_xml_ns : * Everything below is used only by the n
int sax2 : operating in the new SAX mode
int nsNr : the number of inherited namespaces
int nsMax : the size of the arrays
const[xmlChar](libxml-xmlstring.html#xmlChar)* * nsTab : the array of prefix/namespace name
int * attallocs : which[attribute](libxml-SAX.html#attribute)were allocated
void * * pushTab : array of data for push[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)attsDefault : defaulted attributes if any[xmlHashTablePtr](libxml-hash.html#xmlHashTablePtr)attsSpecial : non-CDATA attributes if any
int nsWellFormed : is the document XML Nanespace okay
int options : * Those fields are needed only for tream
int dictNames : Use dictionary names for the tree
int freeElemsNr : number of freed element nodes[xmlNodePtr](libxml-tree.html#xmlNodePtr)freeElems : List of freed element nodes
int freeAttrsNr : number of freed attributes nodes[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)freeAttrs : * the complete error informations for th[xmlError](libxml-xmlerror.html#xmlError)lastError[xmlParserMode](libxml-parser.html#xmlParserMode)parseMode : the parser mode
unsigned long nbentities : number of entities references
unsigned long sizeentities : size of parsed entities for use by HTML[xmlParserNodeInfo](libxml-parser.html#xmlParserNodeInfo)* nodeInfo : Current NodeInfo
int nodeInfoNr : Depth of the parsing stack
int nodeInfoMax : Max depth of the parsing stack[xmlParserNodeInfo](libxml-parser.html#xmlParserNodeInfo)* nodeInfoTab : array of nodeInfos
int input_id : we need to label inputs
unsigned long sizeentcopy : volume of entity copy
}
Structure xmlParserInput
struct _xmlParserInput {[xmlParserInputBufferPtr](libxml-tree.html#xmlParserInputBufferPtr)buf : UTF-8 encoded buffer
const char * filename : The file analyzed, if any
const char * directory : the directory/base of the file
const[xmlChar](libxml-xmlstring.html#xmlChar)* base : Base of the array to parse
const[xmlChar](libxml-xmlstring.html#xmlChar)* cur : Current char being parsed
const[xmlChar](libxml-xmlstring.html#xmlChar)* end : end of the array to parse
int length : length if known
int line : Current line
int col : * NOTE: consumed is only tested for equa
unsigned long consumed : How many xmlChars already consumed[xmlParserInputDeallocate](libxml-parser.html#xmlParserInputDeallocate)free : function to deallocate the base
const[xmlChar](libxml-xmlstring.html#xmlChar)* encoding : the encoding string for entity
const[xmlChar](libxml-xmlstring.html#xmlChar)* version : the version string for entity
int standalone : Was that entity marked standalone
int id : an unique identifier for the entity
}
Structure xmlParserInputBuffer
struct _xmlParserInputBuffer {
void * context[xmlInputReadCallback](libxml-xmlIO.html#xmlInputReadCallback)readcallback[xmlInputCloseCallback](libxml-xmlIO.html#xmlInputCloseCallback)closecallback[xmlCharEncodingHandlerPtr](libxml-encoding.html#xmlCharEncodingHandlerPtr)encoder : I18N conversions to UTF-8[xmlBufPtr](libxml-tree.html#xmlBufPtr)buffer : Local buffer encoded in UTF-8[xmlBufPtr](libxml-tree.html#xmlBufPtr)raw : if encoder != NULL buffer for raw input
int compressed : -1=unknown, 0=not compressed, 1=compres
int error
unsigned long rawconsumed : amount consumed from raw
}
Structure xmlRef
struct _xmlRef {
struct _xmlRef * next : next Ref
const[xmlChar](libxml-xmlstring.html#xmlChar)* value : The Ref name[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)attr : The[attribute](libxml-SAX.html#attribute)holding it
const[xmlChar](libxml-xmlstring.html#xmlChar)* name : The[attribute](libxml-SAX.html#attribute)if attr is not available
int lineno : The line number if attr is not availabl
}
Structure xmlSAXHandler
struct _xmlSAXHandler {[internalSubsetSAXFunc](libxml-parser.html#internalSubsetSAXFunc)internalSubset[isStandaloneSAXFunc](libxml-parser.html#isStandaloneSAXFunc)isStandalone[hasInternalSubsetSAXFunc](libxml-parser.html#hasInternalSubsetSAXFunc)hasInternalSubset[hasExternalSubsetSAXFunc](libxml-parser.html#hasExternalSubsetSAXFunc)hasExternalSubset[resolveEntitySAXFunc](libxml-parser.html#resolveEntitySAXFunc)resolveEntity[getEntitySAXFunc](libxml-parser.html#getEntitySAXFunc)getEntity[entityDeclSAXFunc](libxml-parser.html#entityDeclSAXFunc)entityDecl[notationDeclSAXFunc](libxml-parser.html#notationDeclSAXFunc)notationDecl[attributeDeclSAXFunc](libxml-parser.html#attributeDeclSAXFunc)attributeDecl[elementDeclSAXFunc](libxml-parser.html#elementDeclSAXFunc)elementDecl[unparsedEntityDeclSAXFunc](libxml-parser.html#unparsedEntityDeclSAXFunc)unparsedEntityDecl[setDocumentLocatorSAXFunc](libxml-parser.html#setDocumentLocatorSAXFunc)setDocumentLocator[startDocumentSAXFunc](libxml-parser.html#startDocumentSAXFunc)startDocument[endDocumentSAXFunc](libxml-parser.html#endDocumentSAXFunc)endDocument[startElementSAXFunc](libxml-parser.html#startElementSAXFunc)startElement[endElementSAXFunc](libxml-parser.html#endElementSAXFunc)endElement[referenceSAXFunc](libxml-parser.html#referenceSAXFunc)reference[charactersSAXFunc](libxml-parser.html#charactersSAXFunc)characters[ignorableWhitespaceSAXFunc](libxml-parser.html#ignorableWhitespaceSAXFunc)ignorableWhitespace[processingInstructionSAXFunc](libxml-parser.html#processingInstructionSAXFunc)processingInstruction[commentSAXFunc](libxml-parser.html#commentSAXFunc)comment[warningSAXFunc](libxml-parser.html#warningSAXFunc)warning[errorSAXFunc](libxml-parser.html#errorSAXFunc)error[fatalErrorSAXFunc](libxml-parser.html#fatalErrorSAXFunc)fatalError : unused error() get all the errors[getParameterEntitySAXFunc](libxml-parser.html#getParameterEntitySAXFunc)getParameterEntity[cdataBlockSAXFunc](libxml-parser.html#cdataBlockSAXFunc)cdataBlock[externalSubsetSAXFunc](libxml-parser.html#externalSubsetSAXFunc)externalSubset
unsigned int initialized : The following fields are extensions ava
void * _private[startElementNsSAX2Func](libxml-parser.html#startElementNsSAX2Func)startElementNs[endElementNsSAX2Func](libxml-parser.html#endElementNsSAX2Func)endElementNs[xmlStructuredErrorFunc](libxml-xmlerror.html#xmlStructuredErrorFunc)serror
}
Structure xmlSAXLocator
struct _xmlSAXLocator {
const[xmlChar](libxml-xmlstring.html#xmlChar)*(*getPublicId) getPublicId
const[xmlChar](libxml-xmlstring.html#xmlChar)*(*getSystemId) getSystemId
int(*getLineNumber) getLineNumber
int(*getColumnNumber) getColumnNumber
}
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlAddChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Add a new node to @parent, at the end of the child (or property) list merging adjacent TEXT nodes (in which case @cur is freed) If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.
| parent: | the parent node | | cur: | the child node | | Returns: | the child or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlAddChildList ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Add a list of node at the end of the child list of the parent merging adjacent TEXT nodes (@cur may be freed)
| parent: | the parent node | | cur: | the first node in the list | | Returns: | the last child or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlAddNextSibling ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
Add a new node @elem as the next sibling of @cur If the new node was already inserted in a document it is first unlinked from its existing context. As a result of text merging @elem may be freed. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.
| cur: | the child node | | elem: | the new node | | Returns: | the new node or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlAddPrevSibling ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
Add a new node @elem as the previous sibling of @cur merging adjacent TEXT nodes (@elem may be freed) If the new node was already inserted in a document it is first unlinked from its existing context. If the new node is ATTRIBUTE, it is added into properties instead of children. If there is an attribute with equal name, it is first destroyed.
| cur: | the child node | | elem: | the new node | | Returns: | the new node or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlAddSibling ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem)
Add a new element @elem to the list of siblings of @cur merging adjacent TEXT nodes (@elem may be freed) If the new element was already inserted in a document it is first unlinked from its existing context.
| cur: | the child node | | elem: | the new node | | Returns: | the new element or NULL in case of error. |
void xmlAttrSerializeTxtContent ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)attr,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
Serialize text attribute values to an xml simple buffer
| buf: | the XML buffer output | | doc: | the document | | attr: | the attribute node | | string: | the text content |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlBufContent (const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
Function to extract the content of a buffer
| buf: | the buffer | | Returns: | the internal content |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlBufEnd (const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
Function to extract the end of the content of a buffer
| buf: | the buffer | | Returns: | the end of the internal content or NULL in case of error |
int xmlBufGetNodeContent ([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value
| buf: | a buffer xmlBufPtr | | cur: | the node being read | | Returns: | 0 in case of success and -1 in case of error. |
size_t xmlBufNodeDump ([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format)
Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
| buf: | the XML buffer output | | doc: | the document | | cur: | the current node | | level: | the imbrication level for indenting | | format: | is formatting allowed | | Returns: | the number of bytes written to the buffer, in case of error 0 is returned or @buf stores the error |
size_t xmlBufShrink ([xmlBufPtr](libxml-tree.html#xmlBufPtr)buf,
size_t len)
Remove the beginning of an XML buffer. NOTE that this routine behaviour differs from xmlBufferShrink() as it will return 0 on error instead of -1 due to size_t being used as the return type.
| buf: | the buffer to dump | | len: | the number of xmlChar to remove | | Returns: | the number of byte removed or 0 in case of failure |
size_t xmlBufUse (const[xmlBufPtr](libxml-tree.html#xmlBufPtr)buf)
Function to get the length of a buffer
| buf: | the buffer | | Returns: | the length of data in the internal content |
int xmlBufferAdd ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
int len)
Add a string range to an XML buffer. if len == -1, the length of str is recomputed.
| buf: | the buffer to dump | | str: | the #xmlChar string | | len: | the number of #xmlChar to add | | Returns: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlBufferAddHead ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str,
int len)
Add a string range to the beginning of an XML buffer. if len == -1, the length of @str is recomputed.
| buf: | the buffer | | str: | the #xmlChar string | | len: | the number of #xmlChar to add | | Returns: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlBufferCCat ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const char * str)
Append a zero terminated C string to an XML buffer.
| buf: | the buffer to dump | | str: | the C char string | | Returns: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlBufferCat ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* str)
Append a zero terminated string to an XML buffer.
| buf: | the buffer to add to | | str: | the #xmlChar string | | Returns: | 0 successful, a positive error code number otherwise and -1 in case of internal or API error. |
const[xmlChar](libxml-xmlstring.html#xmlChar)* xmlBufferContent (const[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
Function to extract the content of a buffer
| buf: | the buffer | | Returns: | the internal content |
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)xmlBufferCreate (void)
routine to create an XML buffer.
| Returns: | the new structure. |
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)xmlBufferCreateSize (size_t size)
routine to create an XML buffer.
| size: | initial size of buffer | | Returns: | the new structure. |
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)xmlBufferCreateStatic (void * mem,
size_t size)
routine to create an XML buffer from an immutable memory area. The area won't be modified nor copied, and is expected to be present until the end of the buffer lifetime.
| mem: | the memory area | | size: | the size in byte | | Returns: | the new structure. |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlBufferDetach ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
Remove the string contained in a buffer and gie it back to the caller. The buffer is reset to an empty content. This doesn't work with immutable buffers as they can't be reset.
| buf: | the buffer | | Returns: | the previous string contained by the buffer. |
int xmlBufferDump (FILE * file,
[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
Dumps an XML buffer to a FILE *.
| file: | the file output | | buf: | the buffer to dump | | Returns: | the number of #xmlChar written |
void xmlBufferEmpty ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
empty a buffer.
| buf: | the buffer |
void xmlBufferFree ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
Frees an XML buffer. It frees both the content and the structure which encapsulate it.
| buf: | the buffer to free |
int xmlBufferGrow ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int len)
Grow the available space of an XML buffer.
| buf: | the buffer | | len: | the minimum free size to allocate | | Returns: | the new available space or -1 in case of error |
int xmlBufferLength (const[xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf)
Function to get the length of a buffer
| buf: | the buffer | | Returns: | the length of data in the internal content |
int xmlBufferResize ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int size)
Resize a buffer to accommodate minimum size of @size.
| buf: | the buffer to resize | | size: | the desired size | | Returns: | 0 in case of problems, 1 otherwise |
void xmlBufferSetAllocationScheme ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)scheme)
Sets the allocation scheme for this buffer
| buf: | the buffer to tune | | scheme: | allocation scheme to use |
int xmlBufferShrink ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
unsigned int len)
Remove the beginning of an XML buffer.
| buf: | the buffer to dump | | len: | the number of xmlChar to remove | | Returns: | the number of #xmlChar removed, or -1 in case of failure. |
void xmlBufferWriteCHAR ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
routine which manages and grows an output buffer. This one adds xmlChars at the end of the buffer.
| buf: | the XML buffer | | string: | the string to add |
void xmlBufferWriteChar ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const char * string)
routine which manage and grows an output buffer. This one add C chars at the end of the array.
| buf: | the XML buffer output | | string: | the string to add |
void xmlBufferWriteQuotedString ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
const[xmlChar](libxml-xmlstring.html#xmlChar)* string)
routine which manage and grows an output buffer. This one writes a quoted or double quoted #xmlChar string, checking first if it holds quote or double-quotes internally
| buf: | the XML buffer output | | string: | the string to add |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlBuildQName (const[xmlChar](libxml-xmlstring.html#xmlChar)* ncname,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix,
[xmlChar](libxml-xmlstring.html#xmlChar)* memory,
int len)
Builds the QName @prefix:@ncname in @memory if there is enough space and prefix is not NULL nor empty, otherwise allocate a new string. If prefix is NULL or empty it returns ncname.
| ncname: | the Name | | prefix: | the prefix | | memory: | preallocated memory | | len: | preallocated memory length | | Returns: | the new string which must be freed by the caller if different from @memory and @ncname or NULL in case of error |
unsigned long xmlChildElementCount ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
Finds the current number of child nodes of that element which are element nodes. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
| parent: | the parent node | | Returns: | the count of element child or 0 if not available |
[xmlDocPtr](libxml-tree.html#xmlDocPtr)xmlCopyDoc ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int recursive)
Do a copy of the document info. If recursive, the content tree will be copied too as well as DTD, namespaces and entities.
| doc: | the document | | recursive: | if not zero do a recursive copy. | | Returns: | a new #xmlDocPtr, or NULL in case of error. |
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)xmlCopyDtd ([xmlDtdPtr](libxml-tree.html#xmlDtdPtr)dtd)
Do a copy of the dtd.
| dtd: | the dtd | | Returns: | a new #xmlDtdPtr, or NULL in case of error. |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlCopyNamespace ([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
Do a copy of the namespace.
| cur: | the namespace | | Returns: | a new #xmlNsPtr, or NULL in case of error. |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlCopyNamespaceList ([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
Do a copy of an namespace list.
| cur: | the first namespace | | Returns: | a new #xmlNsPtr, or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlCopyNode (const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
int extended)
Do a copy of the node.
| node: | the node | | extended: | if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) | | Returns: | a new #xmlNodePtr, or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlCopyNodeList (const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Do a recursive copy of the node list. Use xmlDocCopyNodeList() if possible to ensure string interning.
| node: | the first node in the list. | | Returns: | a new #xmlNodePtr, or NULL in case of error. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlCopyProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)target,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
Do a copy of the attribute.
| target: | the element where the attribute will be grafted | | cur: | the attribute | | Returns: | a new #xmlAttrPtr, or NULL in case of error. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlCopyPropList ([xmlNodePtr](libxml-tree.html#xmlNodePtr)target,
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
Do a copy of an attribute list.
| target: | the element where the attributes will be grafted | | cur: | the first attribute | | Returns: | a new #xmlAttrPtr, or NULL in case of error. |
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)xmlCreateIntSubset ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID)
Create the internal subset of a document
| doc: | the document pointer | | name: | the DTD name | | ExternalID: | the external (PUBLIC) ID | | SystemID: | the system ID | | Returns: | a pointer to the new DTD structure |
Function type: xmlDOMWrapAcquireNsFunction[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlDOMWrapAcquireNsFunction ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nsName,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nsPrefix)
A function called to acquire namespaces (xmlNs) from the wrapper.
| ctxt: | a DOM wrapper context | | node: | the context node (element or attribute) | | nsName: | the requested namespace name | | nsPrefix: | the requested namespace prefix | | Returns: | an xmlNsPtr or NULL in case of an error. |
int xmlDOMWrapAdoptNode ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)sourceDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)destDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)destParent,
int options)
References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used This is the case when you have an unliked node and just want to move it to the context of If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.
| ctxt: | the optional context for custom processing | | sourceDoc: | the optional sourceDoc | | node: | the node to start with | | destDoc: | the destination doc | | destParent: | the optional new parent of @node in @destDoc | | options: | option flags | | Returns: | 0 if the operation succeeded, 1 if a node of unsupported type was given, 2 if a node of not yet supported type was given and -1 on API/internal errors. |
int xmlDOMWrapCloneNode ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)sourceDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)* resNode,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)destDoc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)destParent,
int deep,
int options)
References of out-of scope ns-decls are remapped to point to @destDoc: 1) If @destParent is given, then nsDef entries on element-nodes are used 2) If *no* @destParent is given, then @destDoc->oldNs entries are used. This is the case when you don't know already where the cloned branch will be added to. If @destParent is given, it ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. TODO: 1) What to do with XInclude? Currently this returns an error for XInclude.
| ctxt: | the optional context for custom processing | | sourceDoc: | the optional sourceDoc | | node: | the node to start with | | resNode: | the clone of the given @node | | destDoc: | the destination doc | | destParent: | the optional new parent of @node in @destDoc | | deep: | descend into child if set | | options: | option flags | | Returns: | 0 if the operation succeeded, 1 if a node of unsupported (or not yet supported) type was given, -1 on API/internal errors. |
void xmlDOMWrapFreeCtxt ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt)
Frees the DOM-wrapper context.
| ctxt: | the DOM-wrapper context |
[xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)xmlDOMWrapNewCtxt (void)
Allocates and initializes a new DOM-wrapper context.
| Returns: | the xmlDOMWrapCtxtPtr or NULL in case of an internal errror. |
int xmlDOMWrapReconcileNamespaces ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)elem,
int options)
Ensures that ns-references point to ns-decls hold on element-nodes. Ensures that the tree is namespace wellformed by creating additional ns-decls where needed. Note that, since prefixes of already existent ns-decls can be shadowed by this process, it could break QNames in attribute values or element content. NOTE: This function was not intensively tested.
| ctxt: | DOM wrapper context, unused at the moment | | elem: | the element-node | | options: | option flags | | Returns: | 0 if succeeded, -1 otherwise and on API/internal errors. |
int xmlDOMWrapRemoveNode ([xmlDOMWrapCtxtPtr](libxml-tree.html#xmlDOMWrapCtxtPtr)ctxt,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
int options)
Unlinks the given node from its owner. This will substitute ns-references to node->nsDef for ns-references to doc->oldNs, thus ensuring the removed branch to be autark wrt ns-references. NOTE: This function was not intensively tested.
| ctxt: | a DOM wrapper context | | doc: | the doc | | node: | the node to be removed. | | options: | set of options, unused at the moment | | Returns: | 0 on success, 1 if the node is not supported, -1 on API and internal errors. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlDocCopyNode (const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int extended)
Do a copy of the node to a given document.
| node: | the node | | doc: | the document | | extended: | if 1 do a recursive copy (properties, namespaces and children when applicable) if 2 copy properties and namespaces (when applicable) | | Returns: | a new #xmlNodePtr, or NULL in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlDocCopyNodeList ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Do a recursive copy of the node list.
| doc: | the target document | | node: | the first node in the list. | | Returns: | a new #xmlNodePtr, or NULL in case of error. |
int xmlDocDump (FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
Dump an XML document to an open FILE.
| f: | the FILE* | | cur: | the document | | Returns: | the number of bytes written or -1 in case of failure. |
void xmlDocDumpFormatMemory ([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
[xmlChar](libxml-xmlstring.html#xmlChar)** mem,
int * size,
int format)
Dump an XML document in memory and return the #xmlChar * and it's size. It's up to the caller to free the memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
| cur: | the document | | mem: | OUT: the memory pointer | | size: | OUT: the memory length | | format: | should formatting spaces been added |
void xmlDocDumpFormatMemoryEnc ([xmlDocPtr](libxml-tree.html#xmlDocPtr)out_doc,
[xmlChar](libxml-xmlstring.html#xmlChar)** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding,
int format)
Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree(). Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
| out_doc: | Document to generate XML text from | | doc_txt_ptr: | Memory pointer for allocated XML text | | doc_txt_len: | Length of the generated XML text | | txt_encoding: | Character encoding to use when generating XML text | | format: | should formatting spaces been added |
void xmlDocDumpMemory ([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
[xmlChar](libxml-xmlstring.html#xmlChar)** mem,
int * size)
Dump an XML document in memory and return the #xmlChar * and it's size in bytes. It's up to the caller to free the memory with xmlFree(). The resulting byte array is zero terminated, though the last 0 is not included in the returned size.
| cur: | the document | | mem: | OUT: the memory pointer | | size: | OUT: the memory length |
void xmlDocDumpMemoryEnc ([xmlDocPtr](libxml-tree.html#xmlDocPtr)out_doc,
[xmlChar](libxml-xmlstring.html#xmlChar)** doc_txt_ptr,
int * doc_txt_len,
const char * txt_encoding)
Dump the current DOM tree into memory using the character encoding specified by the caller. Note it is up to the caller of this function to free the allocated memory with xmlFree().
| out_doc: | Document to generate XML text from | | doc_txt_ptr: | Memory pointer for allocated XML text | | doc_txt_len: | Length of the generated XML text | | txt_encoding: | Character encoding to use when generating XML text |
int xmlDocFormatDump (FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
int format)
Dump an XML document to an open FILE.
| f: | the FILE* | | cur: | the document | | format: | should formatting spaces been added | | Returns: | the number of bytes written or -1 in case of failure. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlDocGetRootElement ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
Get the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).
| doc: | the document | | Returns: | the #xmlNodePtr for the root or NULL |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlDocSetRootElement ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)root)
Set the root element of the document (doc->children is a list containing possibly comments, PIs, etc ...).
| doc: | the document | | root: | the new document root element, if root is NULL no action is taken, to remove a node from a document use xmlUnlinkNode(root) instead. | | Returns: | the old root element if any was found, NULL if root was NULL |
void xmlElemDump (FILE * f,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Dump an XML/HTML node, recursive behaviour, children are printed too.
| f: | the FILE * for the output | | doc: | the document | | cur: | the current node |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlFirstElementChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
Finds the first child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
| parent: | the parent node | | Returns: | the first element child or NULL if not available |
void xmlFreeDoc ([xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
Free up all the structures used by a document, tree included.
| cur: | pointer to the document |
void xmlFreeDtd ([xmlDtdPtr](libxml-tree.html#xmlDtdPtr)cur)
Free a DTD structure.
| cur: | the DTD structure to free up |
void xmlFreeNode ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Free a node, this is a recursive behaviour, all the children are freed too. This doesn't unlink the child from the list, use xmlUnlinkNode() first.
| cur: | the node |
void xmlFreeNodeList ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Free a node and all its siblings, this is a recursive behaviour, all the children are freed too.
| cur: | the first node in the list |
void xmlFreeNs ([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
Free up the structures associated to a namespace
| cur: | the namespace pointer |
void xmlFreeNsList ([xmlNsPtr](libxml-tree.html#xmlNsPtr)cur)
Free up all the structures associated to the chained namespaces.
| cur: | the first namespace pointer |
void xmlFreeProp ([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
Free one attribute, all the content is freed too
| cur: | an attribute |
void xmlFreePropList ([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
Free a property and all its siblings, all the children are freed too.
| cur: | the first property in the list |
[xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)xmlGetBufferAllocationScheme (void)
Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance XML_BUFFER_ALLOC_HYBRID - use exact sizes on small strings to keep memory usage tight in normal usage, and doubleit on large strings to avoid pathological performance.
| Returns: | the current allocation scheme |
int xmlGetCompressMode (void)
get the default compression mode used, ZLIB based.
| Returns: | 0 (uncompressed) to 9 (max compression) |
int xmlGetDocCompressMode ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
get the compression ratio for a document, ZLIB based
| doc: | the document | | Returns: | 0 (uncompressed) to 9 (max compression) |
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)xmlGetIntSubset ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
Get the internal subset of a document
| doc: | the document pointer | | Returns: | a pointer to the DTD structure or NULL if not found |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlGetLastChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
Search the last child of a node.
| parent: | the parent node | | Returns: | the last child or NULL if none. |
long xmlGetLineNo ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Get line number of @node. Try to override the limitation of lines being store in 16 bits ints if XML_PARSE_BIG_LINES parser option was used
| node: | valid node | | Returns: | the line number if successful, -1 otherwise |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlGetNoNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. This function is similar to xmlGetProp except it will accept only an attribute in no namespace.
| node: | the node | | name: | the attribute name | | Returns: | the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree(). |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlGetNodePath ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Build a structure based Path for the given node
| node: | a node | | Returns: | the new path or NULL in case of error. The caller must free the returned string |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)* xmlGetNsList ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Search all the namespace applying to a given element.
| doc: | the document | | node: | the current node | | Returns: | an NULL terminated array of all the #xmlNsPtr found that need to be freed by the caller or NULL if no namespace if defined |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlGetNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
Search and get the value of an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.
| node: | the node | | name: | the attribute name | | nameSpace: | the URI of the namespace | | Returns: | the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree(). |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlGetProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Search and get the value of an attribute associated to a node This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. NOTE: this function acts independently of namespaces associated to the attribute. Use xmlGetNsProp() or xmlGetNoNsProp() for namespace aware processing.
| node: | the node | | name: | the attribute name | | Returns: | the attribute value or NULL if not found. It's up to the caller to free the memory with xmlFree(). |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlHasNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
Search for an attribute associated to a node This attribute has to be anchored in the namespace specified. This does the entity substitution. This function looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off. Note that a namespace of NULL indicates to use the default namespace.
| node: | the node | | name: | the attribute name | | nameSpace: | the URI of the namespace | | Returns: | the attribute or the attribute declaration or NULL if neither was found. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlHasProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Search an attribute associated to a node This function also looks in DTD attribute declaration for #FIXED or default declaration values unless DTD use has been turned off.
| node: | the node | | name: | the attribute name | | Returns: | the attribute or the attribute declaration or NULL if neither was found. |
int xmlIsBlankNode ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Checks whether this node is an empty or whitespace only (and possibly ignorable) text-node.
| node: | the node | | Returns: | 1 yes, 0 no |
int xmlIsXHTML (const[xmlChar](libxml-xmlstring.html#xmlChar)* systemID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* publicID)
Try to find if the document correspond to an XHTML DTD
| systemID: | the system identifier | | publicID: | the public identifier | | Returns: | 1 if true, 0 if not and -1 in case of error |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlLastElementChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent)
Finds the last child node of that element which is a Element node Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
| parent: | the parent node | | Returns: | the last element child or NULL if not available |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewCDataBlock ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Creation of a new node containing a CDATA block.
| doc: | the document | | content: | the CDATA block content content | | len: | the length of the block | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewCharRef ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Creation of a new character reference node.
| doc: | the document | | name: | the char ref string, starting with # or "&# ... ;" | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child list containing the TEXTs and ENTITY_REFs node will be created. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references. XML special chars must be escaped first by using xmlEncodeEntitiesReentrant(), or xmlNewTextChild() should be used.
| parent: | the parent node | | ns: | a namespace if any | | name: | the name of the child | | content: | the XML content of the child if any. | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewComment (const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new node containing a comment.
| content: | the comment content | | Returns: | a pointer to the new node object. |
[xmlDocPtr](libxml-tree.html#xmlDocPtr)xmlNewDoc (const[xmlChar](libxml-xmlstring.html#xmlChar)* version)
Creates a new XML document
| version: | xmlChar string giving the version of XML "1.0" | | Returns: | a new document |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocComment ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new node containing a comment within a document.
| doc: | the document | | content: | the comment content | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocFragment ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
Creation of a new Fragment node.
| doc: | the document owning the fragment | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocNode ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.
| doc: | the document | | ns: | namespace if any | | name: | the node name | | content: | the XML text content if any | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocNodeEatName ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new node element within a document. @ns and @content are optional (NULL). NOTE: @content is supposed to be a piece of XML CDATA, so it allow entities references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant(). Use xmlNewDocRawNode() if you don't need entities support.
| doc: | the document | | ns: | namespace if any | | name: | the node name | | content: | the XML text content if any | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocPI ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a processing instruction element.
| doc: | the target document | | name: | the processing instruction name | | content: | the PI content | | Returns: | a pointer to the new node object. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlNewDocProp ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Create a new property carried by a document.
| doc: | the document | | name: | the name of the attribute | | value: | the value of the attribute | | Returns: | a pointer to the attribute |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocRawNode ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new node element within a document. @ns and @content are optional (NULL).
| doc: | the document | | ns: | namespace if any | | name: | the node name | | content: | the text content if any | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocText ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new text node within a document.
| doc: | the document | | content: | the text content | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewDocTextLen ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Creation of a new text node with an extra content length parameter. The text node pertain to a given document.
| doc: | the document | | content: | the text content | | len: | the text len. | | Returns: | a pointer to the new node object. |
[xmlDtdPtr](libxml-tree.html#xmlDtdPtr)xmlNewDtd ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* ExternalID,
const[xmlChar](libxml-xmlstring.html#xmlChar)* SystemID)
Creation of a new DTD for the external subset. To create an internal subset, use xmlCreateIntSubset().
| doc: | the document pointer | | name: | the DTD name | | ExternalID: | the external ID | | SystemID: | the system ID | | Returns: | a pointer to the new DTD structure |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlNewGlobalNs ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix)
Creation of a Namespace, the old way using PI and without scoping DEPRECATED !!!
| doc: | the document carrying the namespace | | href: | the URI associated | | prefix: | the prefix for the namespace | | Returns: | NULL this functionality had been removed |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewNode ([xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Creation of a new node element. @ns is optional (NULL).
| ns: | namespace if any | | name: | the node name | | Returns: | a pointer to the new node object. Uses xmlStrdup() to make copy of @name. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewNodeEatName ([xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Creation of a new node element. @ns is optional (NULL).
| ns: | namespace if any | | name: | the node name | | Returns: | a pointer to the new node object, with pointer @name as new node's name. Use xmlNewNode() if a copy of @name string is is needed as new node's name. |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlNewNs ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href,
const[xmlChar](libxml-xmlstring.html#xmlChar)* prefix)
Creation of a new Namespace. This function will refuse to create a namespace with a similar prefix than an existing one present on this node. We use href==NULL in the case of an element creation where the namespace was not defined.
| node: | the element carrying the namespace | | href: | the URI associated | | prefix: | the prefix for the namespace | | Returns: | a new namespace pointer or NULL |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlNewNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Create a new property tagged with a namespace and carried by a node.
| node: | the holding node | | ns: | the namespace | | name: | the name of the attribute | | value: | the value of the attribute | | Returns: | a pointer to the attribute |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlNewNsPropEatName ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Create a new property tagged with a namespace and carried by a node.
| node: | the holding node | | ns: | the namespace | | name: | the name of the attribute | | value: | the value of the attribute | | Returns: | a pointer to the attribute |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewPI (const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a processing instruction element. Use xmlDocNewPI preferably to get string interning
| name: | the processing instruction name | | content: | the PI content | | Returns: | a pointer to the new node object. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlNewProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Create a new property carried by a node.
| node: | the holding node | | name: | the name of the attribute | | value: | the value of the attribute | | Returns: | a pointer to the attribute |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewReference ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Creation of a new reference node.
| doc: | the document | | name: | the reference name, or the reference string with & and ; | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewText (const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new text node.
| content: | the text content | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewTextChild ([xmlNodePtr](libxml-tree.html#xmlNodePtr)parent,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Creation of a new child element, added at the end of @parent children list. @ns and @content parameters are optional (NULL). If @ns is NULL, the newly created element inherits the namespace of @parent. If @content is non NULL, a child TEXT node will be created containing the string @content. NOTE: Use xmlNewChild() if @content will contain entities that need to be preserved. Use this function, xmlNewTextChild(), if you need to ensure that reserved XML chars that might appear in @content, such as the ampersand, greater-than or less-than signs, are automatically replaced by their XML escaped entity representations.
| parent: | the parent node | | ns: | a namespace if any | | name: | the name of the child | | content: | the text content of the child if any. | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNewTextLen (const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Creation of a new text node with an extra parameter for the content's length
| content: | the text content | | len: | the text len. | | Returns: | a pointer to the new node object. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlNextElementSibling ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Finds the first closest next sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
| node: | the current node | | Returns: | the next element sibling or NULL if not available |
void xmlNodeAddContent ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContent(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.
| cur: | the node being modified | | content: | extra content |
void xmlNodeAddContentLen ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Append the extra substring to the node content. NOTE: In contrast to xmlNodeSetContentLen(), @content is supposed to be raw text, so unescaped XML special chars are allowed, entity references are not supported.
| cur: | the node being modified | | content: | extra content | | len: | the size of @content |
int xmlNodeBufGetContent ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buffer,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Read the value of a node @cur, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted. Fills up the buffer @buffer with this value
| buffer: | a buffer | | cur: | the node being read | | Returns: | 0 in case of success and -1 in case of error. |
int xmlNodeDump ([xmlBufferPtr](libxml-tree.html#xmlBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format)
Dump an XML node, recursive behaviour,children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called Since this is using xmlBuffer structures it is limited to 2GB and somehow deprecated, use xmlBufNodeDump() instead.
| buf: | the XML buffer output | | doc: | the document | | cur: | the current node | | level: | the imbrication level for indenting | | format: | is formatting allowed | | Returns: | the number of bytes written to the buffer or -1 in case of error |
void xmlNodeDumpOutput ([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int level,
int format,
const char * encoding)
Dump an XML node, recursive behaviour, children are printed too. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
| buf: | the XML buffer output | | doc: | the document | | cur: | the current node | | level: | the imbrication level for indenting | | format: | is formatting allowed | | encoding: | an optional encoding string |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlNodeGetBase ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
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
| doc: | the document the node pertains to | | cur: | the node being checked | | Returns: | a pointer to the base URL, or NULL if not found It's up to the caller to free the memory with xmlFree(). |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlNodeGetContent ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Read the value of a node, this can be either the text carried directly by this node if it's a TEXT node or the aggregate string of the values carried by this node child's (TEXT and ENTITY_REF). Entity references are substituted.
| cur: | the node being read | | Returns: | a new #xmlChar * or NULL if no content is available. It's up to the caller to free the memory with xmlFree(). |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlNodeGetLang ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Searches the language of a node, i.e. the values of the xml:lang attribute or the one carried by the nearest ancestor.
| cur: | the node being checked | | Returns: | a pointer to the lang value, or NULL if not found It's up to the caller to free the memory with xmlFree(). |
int xmlNodeGetSpacePreserve ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Searches the space preserving behaviour of a node, i.e. the values of the xml:space attribute or the one carried by the nearest ancestor.
| cur: | the node being checked | | Returns: | -1 if xml:space is not inherited, 0 if "default", 1 if "preserve" |
int xmlNodeIsText ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Is this node a Text node ?
| node: | the node | | Returns: | 1 yes, 0 no |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlNodeListGetRawString ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
int inLine)
Builds the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs, contrary to xmlNodeListGetString() this function doesn't do any character encoding handling.
| doc: | the document | | list: | a Node list | | inLine: | should we replace entity contents or show their external form | | Returns: | a pointer to the string copy, the caller must free it with xmlFree(). |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlNodeListGetString ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
int inLine)
Build the string equivalent to the text contained in the Node list made of TEXTs and ENTITY_REFs
| doc: | the document | | list: | a Node list | | inLine: | should we replace entity contents or show their external form | | Returns: | a pointer to the string copy, the caller must free it with xmlFree(). |
void xmlNodeSetBase ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* uri)
Set (or reset) the base URI of a node, i.e. the value of the xml:base attribute.
| cur: | the node being changed | | uri: | the new base URI |
void xmlNodeSetContent ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content)
Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().
| cur: | the node being modified | | content: | the new value of the content |
void xmlNodeSetContentLen ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Replace the content of a node. NOTE: @content is supposed to be a piece of XML CDATA, so it allows entity references, but XML special chars need to be escaped first by using xmlEncodeEntitiesReentrant() resp. xmlEncodeSpecialChars().
| cur: | the node being modified | | content: | the new value of the content | | len: | the size of @content |
void xmlNodeSetLang ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* lang)
Set the language of a node, i.e. the values of the xml:lang attribute.
| cur: | the node being changed | | lang: | the language description |
void xmlNodeSetName ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Set (or reset) the name of a node.
| cur: | the node being changed | | name: | the new tag name |
void xmlNodeSetSpacePreserve ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur,
int val)
Set (or reset) the space preserving behaviour of a node, i.e. the value of the xml:space attribute.
| cur: | the node being changed | | val: | the xml:space value ("0": default, 1: "preserve") |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlPreviousElementSibling ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node)
Finds the first closest previous sibling of the node which is an element node. Note the handling of entities references is different than in the W3C DOM element traversal spec since we don't have back reference from entities content to entities references.
| node: | the current node | | Returns: | the previous element sibling or NULL if not available |
int xmlReconciliateNs ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)tree)
This function checks that all the namespaces declared within the given tree are properly declared. This is needed for example after Copy or Cut and then paste operations. The subtree may still hold pointers to namespace declarations outside the subtree or invalid/masked. As much as possible the function try to reuse the existing namespaces found in the new environment. If not possible the new namespaces are redeclared on @tree at the top of the given subtree.
| doc: | the document | | tree: | a node defining the subtree to reconciliate | | Returns: | the number of namespace declarations created or -1 in case of error. |
int xmlRemoveProp ([xmlAttrPtr](libxml-tree.html#xmlAttrPtr)cur)
Unlink and free one attribute, all the content is freed too Note this doesn't work for namespace definition attributes
| cur: | an attribute | | Returns: | 0 if success and -1 in case of error. |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlReplaceNode ([xmlNodePtr](libxml-tree.html#xmlNodePtr)old,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Unlink the old node from its current context, prune the new one at the same place. If @cur was already inserted in a document it is first unlinked from its existing context.
| old: | the old node | | cur: | the node | | Returns: | the @old node |
int xmlSaveFile (const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur)
Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used.
| filename: | the filename (or URL) | | cur: | the document | | Returns: | the number of bytes written or -1 in case of failure. |
int xmlSaveFileEnc (const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding)
Dump an XML document, converting it to the given encoding
| filename: | the filename (or URL) | | cur: | the document | | encoding: | the name of an encoding (or NULL) | | Returns: | the number of bytes written or -1 in case of failure. |
int xmlSaveFileTo ([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding)
Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.
| buf: | an output I/O buffer | | cur: | the document | | encoding: | the encoding if any assuming the I/O layer handles the trancoding | | Returns: | the number of bytes written or -1 in case of failure. |
int xmlSaveFormatFile (const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
int format)
Dump an XML document to a file. Will use compression if compiled in and enabled. If @filename is "-" the stdout file is used. If @format is set then the document will be indented on output. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called
| filename: | the filename (or URL) | | cur: | the document | | format: | should formatting spaces been added | | Returns: | the number of bytes written or -1 in case of failure. |
int xmlSaveFormatFileEnc (const char * filename,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding,
int format)
Dump an XML document to a file or an URL.
| filename: | the filename or URL to output | | cur: | the document being saved | | encoding: | the name of the encoding to use or NULL. | | format: | should formatting spaces be added. | | Returns: | the number of bytes written or -1 in case of error. Note that @format = 1 provide node indenting only if xmlIndentTreeOutput = 1 or xmlKeepBlanksDefault(0) was called |
int xmlSaveFormatFileTo ([xmlOutputBufferPtr](libxml-tree.html#xmlOutputBufferPtr)buf,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)cur,
const char * encoding,
int format)
Dump an XML document to an I/O buffer. Warning ! This call xmlOutputBufferClose() on buf which is not available after this call.
| buf: | an output I/O buffer | | cur: | the document | | encoding: | the encoding if any assuming the I/O layer handles the trancoding | | format: | should formatting spaces been added | | Returns: | the number of bytes written or -1 in case of failure. |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlSearchNs ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* nameSpace)
Search a Ns registered under a given name space for a document. recurse on the parents until it finds the defined namespace or return NULL otherwise. @nameSpace can be NULL, this is a search for the default namespace. We don't allow to cross entities boundaries. If you don't declare the namespace within those you will be in troubles !!! A warning is generated to cover this case.
| doc: | the document | | node: | the current node | | nameSpace: | the namespace prefix | | Returns: | the namespace pointer or NULL. |
[xmlNsPtr](libxml-tree.html#xmlNsPtr)xmlSearchNsByHref ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* href)
Search a Ns aliasing a given URI. Recurse on the parents until it finds the defined namespace or return NULL otherwise.
| doc: | the document | | node: | the current node | | href: | the namespace value | | Returns: | the namespace pointer or NULL. |
void xmlSetBufferAllocationScheme ([xmlBufferAllocationScheme](libxml-tree.html#xmlBufferAllocationScheme)scheme)
Set the buffer allocation method. Types are XML_BUFFER_ALLOC_EXACT - use exact sizes, keeps memory usage down XML_BUFFER_ALLOC_DOUBLEIT - double buffer when extra needed, improves performance
| scheme: | allocation method to use |
void xmlSetCompressMode (int mode)
set the default compression mode used, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)
| mode: | the compression ratio |
void xmlSetDocCompressMode ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
int mode)
set the compression ratio for a document, ZLIB based Correct values: 0 (uncompressed) to 9 (max compression)
| doc: | the document | | mode: | the compression ratio |
void xmlSetListDoc ([xmlNodePtr](libxml-tree.html#xmlNodePtr)list,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
update all nodes in the list to point to the right document
| list: | the first element | | doc: | the document |
void xmlSetNs ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns)
Associate a namespace to a node, a posteriori.
| node: | a node in the document | | ns: | a namespace pointer |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlSetNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Set (or reset) an attribute carried by a node. The ns structure must be in scope, this is not checked
| node: | the node | | ns: | the namespace definition | | name: | the attribute name | | value: | the attribute value | | Returns: | the attribute pointer. |
[xmlAttrPtr](libxml-tree.html#xmlAttrPtr)xmlSetProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Set (or reset) an attribute carried by a node. If @name has a prefix, then the corresponding namespace-binding will be used, if in scope; it is an error it there's no such ns-binding for the prefix in scope.
| node: | the node | | name: | the attribute name (a QName) | | value: | the attribute value | | Returns: | the attribute pointer. |
void xmlSetTreeDoc ([xmlNodePtr](libxml-tree.html#xmlNodePtr)tree,
[xmlDocPtr](libxml-tree.html#xmlDocPtr)doc)
update all nodes under the tree to point to the right document
| tree: | the top element | | doc: | the document |
[xmlChar](libxml-xmlstring.html#xmlChar)* xmlSplitQName2 (const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
[xmlChar](libxml-xmlstring.html#xmlChar)** prefix)
parse an XML qualified name string [NS 5] QName ::= (Prefix ':')? LocalPart [NS 6] Prefix ::= NCName [NS 7] LocalPart ::= NCName
| name: | the full QName | | prefix: | a xmlChar ** | | Returns: | NULL if not a QName, otherwise the local part, and prefix is updated to get the Prefix if any. |
const[xmlChar](libxml-xmlstring.html#xmlChar)* xmlSplitQName3 (const[xmlChar](libxml-xmlstring.html#xmlChar)* name,
int * len)
parse an XML qualified name string,i
| name: | the full QName | | len: | an int * | | Returns: | NULL if it is not a Qualified Name, otherwise, update len with the length in byte of the prefix and return a pointer to the start of the name without the prefix |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlStringGetNodeList ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value)
Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.
| doc: | the document | | value: | the value of the attribute | | Returns: | a pointer to the first child |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlStringLenGetNodeList ([xmlDocPtr](libxml-tree.html#xmlDocPtr)doc,
const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int len)
Parse the value string and build the node list associated. Should produce a flat tree with only TEXTs and ENTITY_REFs.
| doc: | the document | | value: | the value of the text | | len: | the length of the string value | | Returns: | a pointer to the first child |
int xmlTextConcat ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* content,
int len)
Concat the given string at the end of the existing node content
| node: | the node | | content: | the content | | len: | @content length | | Returns: | -1 in case of error, 0 otherwise |
[xmlNodePtr](libxml-tree.html#xmlNodePtr)xmlTextMerge ([xmlNodePtr](libxml-tree.html#xmlNodePtr)first,
[xmlNodePtr](libxml-tree.html#xmlNodePtr)second)
Merge two text nodes into one
| first: | the first text node | | second: | the second text node being merged | | Returns: | the first text node augmented |
void xmlUnlinkNode ([xmlNodePtr](libxml-tree.html#xmlNodePtr)cur)
Unlink a node from it's current context, the node is not freed If one need to free the node, use xmlFreeNode() routine after the unlink to discard it. Note that namespace nodes can't be unlinked as they do not have pointer to their parent.
| cur: | the node |
int xmlUnsetNsProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
[xmlNsPtr](libxml-tree.html#xmlNsPtr)ns,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Remove an attribute carried by a node.
| node: | the node | | ns: | the namespace definition | | name: | the attribute name | | Returns: | 0 if successful, -1 if not found |
int xmlUnsetProp ([xmlNodePtr](libxml-tree.html#xmlNodePtr)node,
const[xmlChar](libxml-xmlstring.html#xmlChar)* name)
Remove an attribute carried by a node. This handles only attributes in no namespace.
| node: | the node | | name: | the attribute name | | Returns: | 0 if successful, -1 if not found |
int xmlValidateNCName (const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
Check that a value conforms to the lexical space of NCName
| value: | the value to check | | space: | allow spaces in front and end of the string | | Returns: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlValidateNMToken (const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
Check that a value conforms to the lexical space of NMToken
| value: | the value to check | | space: | allow spaces in front and end of the string | | Returns: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlValidateName (const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
Check that a value conforms to the lexical space of Name
| value: | the value to check | | space: | allow spaces in front and end of the string | | Returns: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error. |
int xmlValidateQName (const[xmlChar](libxml-xmlstring.html#xmlChar)* value,
int space)
Check that a value conforms to the lexical space of QName
| value: | the value to check | | space: | allow spaces in front and end of the string | | Returns: | 0 if this validates, a positive error code number otherwise and -1 in case of internal or API error. |
|
|
|
|
|