Module xml-tree Methods
AddChildToXMLTree
AddChildToXMLTree() adds a child tag at an offset relative to the start of the parent tag's character content. Return the child tag.
The format of the AddChildToXMLTree method is:
XMLTreeInfo *AddChildToXMLTree(XMLTreeInfo *xml_info,const char *tag,
const size_t offset)
A description of each parameter follows:
xml_info
the xml info.
tag
the tag.
offset
the tag offset.
AddPathToXMLTree
AddPathToXMLTree() adds a child tag at an offset relative to the start of the parent tag's character content. This method returns the child tag.
The format of the AddPathToXMLTree method is:
XMLTreeInfo *AddPathToXMLTree(XMLTreeInfo *xml_info,const char *path,
const size_t offset)
A description of each parameter follows:
xml_info
the xml info.
path
the path.
offset
the tag offset.
CanonicalXMLContent
CanonicalXMLContent() converts text to canonical XML content by converting to UTF-8, substituting predefined entities, wrapping as CDATA, or encoding as base-64 as required.
The format of the CanonicalXMLContent method is:
char *CanonicalXMLContent(const char *content,
const WizardBooleanType pedantic)
A description of each parameter follows:
content
the content.
pedantic
if true, replace newlines and tabs with their respective entities.
DestroyXMLTree
DestroyXMLTree() destroys the xml-tree.
The format of the DestroyXMLTree method is:
XMLTreeInfo *DestroyXMLTree(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
GetNextXMLTreeTag
GetNextXMLTreeTag() returns the next tag or NULL if not found.
The format of the GetNextXMLTreeTag method is:
XMLTreeInfo *GetNextXMLTreeTag(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreeAttribute
GetXMLTreeAttribute() returns the value of the attribute tag with the specified tag if found, otherwise NULL.
The format of the GetXMLTreeAttribute method is:
const char *GetXMLTreeAttribute(XMLTreeInfo *xml_info,const char *tag)
A description of each parameter follows:
xml_info
the xml info.
tag
the attribute tag.
GetXMLTreeAttributes
GetXMLTreeAttributes() injects all attributes associated with the current tag in the specified splay-tree.
The format of the GetXMLTreeAttributes method is:
WizardBooleanType GetXMLTreeAttributes(const XMLTreeInfo *xml_info,
SplayTreeInfo *attributes)
A description of each parameter follows:
xml_info
the xml info.
attributes
the attribute splay-tree.
GetXMLTreeChild
GetXMLTreeChild() returns the first child tag with the specified tag if found, otherwise NULL.
The format of the GetXMLTreeChild method is:
XMLTreeInfo *GetXMLTreeChild(XMLTreeInfo *xml_info,const char *tag)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreeContent
GetXMLTreeContent() returns any content associated with specified xml-tree node.
The format of the GetXMLTreeContent method is:
const char *GetXMLTreeContent(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreeOrdered
GetXMLTreeOrdered() returns the next ordered node if found, otherwise NULL.
The format of the GetXMLTreeOrdered method is:
XMLTreeInfo *GetXMLTreeOrdered(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreePath
GetXMLTreePath() traverses the XML-tree as defined by the specified path and returns the node if found, otherwise NULL.
The format of the GetXMLTreePath method is:
XMLTreeInfo *GetXMLTreePath(XMLTreeInfo *xml_info,const char *path)
A description of each parameter follows:
xml_info
the xml info.
path
the path (e.g. property/elapsed-time).
GetXMLTreeProcessingInstructions
GetXMLTreeProcessingInstructions() returns a null terminated array of processing instructions for the given target.
The format of the GetXMLTreeProcessingInstructions method is:
const char **GetXMLTreeProcessingInstructions(XMLTreeInfo *xml_info,
const char *target)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreeSibling
GetXMLTreeSibling() returns the node sibling if found, otherwise NULL.
The format of the GetXMLTreeSibling method is:
XMLTreeInfo *GetXMLTreeSibling(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
GetXMLTreeTag
GetXMLTreeTag() returns the tag associated with specified xml-tree node.
The format of the GetXMLTreeTag method is:
const char *GetXMLTreeTag(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
InsertTagIntoXMLTree
InsertTagIntoXMLTree() inserts a tag at an offset relative to the start of the parent tag's character content. This method returns the child tag.
The format of the InsertTagIntoXMLTree method is:
XMLTreeInfo *InsertTagIntoXMLTree(XMLTreeInfo *xml_info,
XMLTreeInfo *child,const size_t offset)
A description of each parameter follows:
xml_info
the xml info.
child
the child tag.
offset
the tag offset.
NewXMLTree
NewXMLTree() returns a XMLTreeInfo xml-tree as defined by the specified XML string.
The format of the NewXMLTree method is:
XMLTreeInfo *NewXMLTree(const char *xml,ExceptionInfo *exception)
A description of each parameter follows:
xml
The XML string.
exception
Return any errors or warnings in this structure.
NewXMLTreeTag
NewXMLTreeTag() returns a new empty xml structure for the xml-tree tag.
The format of the NewXMLTreeTag method is:
XMLTreeInfo *NewXMLTreeTag(const char *tag)
A description of each parameter follows:
tag
the tag.
PruneTagFromXMLTree
PruneTagFromXMLTree() prunes a tag from the xml-tree assize_t with all its subtags.
The format of the PruneTagFromXMLTree method is:
XMLTreeInfo *PruneTagFromXMLTree(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.
SetXMLTreeAttribute
SetXMLTreeAttribute() sets the tag attributes or adds a new attribute if not found. A value of NULL removes the specified attribute.
The format of the SetXMLTreeAttribute method is:
XMLTreeInfo *SetXMLTreeAttribute(XMLTreeInfo *xml_info,const char *tag,
const char *value)
A description of each parameter follows:
xml_info
the xml info.
tag
The attribute tag.
value
The attribute value.
SetXMLTreeContent
SetXMLTreeContent() sets the character content for the given tag and returns the tag.
The format of the SetXMLTreeContent method is:
XMLTreeInfo *SetXMLTreeContent(XMLTreeInfo *xml_info,
const char *content)
A description of each parameter follows:
xml_info
the xml info.
content
The content.
XMLTreeInfoToXML
XMLTreeInfoToXML() converts an xml-tree to an XML string.
The format of the XMLTreeInfoToXML method is:
char *XMLTreeInfoToXML(XMLTreeInfo *xml_info)
A description of each parameter follows:
xml_info
the xml info.

![[sponsor]](../../images/networkredux.png)