libSBML C API  5.18.0
XMLNode_t Class Reference

Detailed Description

A node in libSBML's XML document tree.

LibSBML implements an XML abstraction layer. This layer presents a uniform XML interface to calling programs regardless of which underlying XML parser libSBML has actually been configured to use. The basic data object in the XML abstraction is a node, represented by XMLNode_t.

An XMLNode_t can contain any number of children. Each child is another XMLNode_t, thereby forming a tree. The methods XMLNode_t::getNumChildren() and XMLNode_t::getChild() can be used to access the tree structure starting from a given node.

Each XMLNode_t is subclassed from XMLToken_t, and thus has the same methods available as XMLToken_t. These methods include XMLToken_t::getNamespaces(), XMLToken_t::getPrefix(), XMLToken_t::getName(), XMLToken_t::getURI(), and XMLToken_t::getAttributes().

Conversion between an XML string and an XMLNode_t

LibSBML provides the following utility functions for converting an XML string (e.g., <annotation>...</annotation>) to/from an XMLNode_t object.

  • XMLNode_t::toXMLString() returns a string representation of the XMLNode_t object.
  • XMLNode_t::convertXMLNodeToString() (static function) returns a string representation of the given XMLNode_t object.
  • XMLNode_t::convertStringToXMLNode() (static function) returns an XMLNode_t object converted from the given XML string.

The returned XMLNode_t object by XMLNode_t::convertStringToXMLNode() is a dummy root (container) XMLNode_t if the given XML string has two or more top-level elements (e.g., "<p>...</p><p>...</p>"). In the dummy root node, each top-level element in the given XML string is contained as a child XMLNode_t. XMLToken_t::isEOF() can be used to identify if the returned XMLNode_t object is a dummy node or not. Here is an example:

Examples:
addingEvidenceCodes_2.c, and createExampleSBML.c.

Public Member Functions

LIBLAX_EXTERN int XMLNode_addAttr (XMLNode_t *node, const char *name, const char *value)
 Adds an attribute with the given local name to the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_addAttrWithNS (XMLNode_t *node, const char *name, const char *value, const char *namespaceURI, const char *prefix)
 Adds an attribute with a prefix and namespace URI to the attribute set in this XMLNode_t optionally Nothing will be done if this XMLNode_t is not a start element. More...
 
LIBLAX_EXTERN int XMLNode_addAttrWithTriple (XMLNode_t *node, const XMLTriple_t *triple, const char *value)
 Adds an attribute with the given XMLTriple_t/value pair to the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_addChild (XMLNode_t *node, const XMLNode_t *child)
 Adds a copy of child node to this XMLNode_t structure. More...
 
LIBLAX_EXTERN int XMLNode_addNamespace (XMLNode_t *node, const char *uri, const char *prefix)
 Appends an XML namespace prefix and URI pair to this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_clearAttributes (XMLNode_t *node)
 Clears (deletes) all attributes in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_clearNamespaces (XMLNode_t *node)
 Clears (deletes) all XML namespace declarations in the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_clone (const XMLNode_t *n)
 Creates a deep copy of the given XMLNode_t structure. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_convertStringToXMLNode (const char *xml, const XMLNamespaces_t *xmlns)
 Returns an XMLNode_t pointer which is converted from a given string containing XML content. More...
 
LIBLAX_EXTERN const char * XMLNode_convertXMLNodeToString (const XMLNode_t *node)
 Returns a string which is converted from a given XMLNode_t. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_create (void)
 Creates a new empty XMLNode_t structure with no children and returns a pointer to it. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_createEndElement (const XMLTriple_t *triple)
 Creates a new end element XMLNode_t structure with XMLTriple_t structure set and returns a pointer to it. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_createFromToken (const XMLToken_t *token)
 Creates a new XMLNode_t structure by copying token and returns a pointer to it. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_createStartElement (const XMLTriple_t *triple, const XMLAttributes_t *attr)
 Creates a new start element XMLNode_t structure with XMLTriple_t and XMLAttributes_t structures set and returns a pointer to it. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_createStartElementNS (const XMLTriple_t *triple, const XMLAttributes_t *attr, const XMLNamespaces_t *ns)
 Creates a new start element XMLNode_t structure with XMLTriple_t, XMLAttributes_t and XMLNamespaces_t structures set and returns a pointer to it. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_createTextNode (const char *text)
 Creates a text XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_equals (const XMLNode_t *node, const XMLNode_t *other)
 Compare one XMLNode_t against another XMLNode_t returning 1 (true) if both nodes represent the same XML tree, or 0 (false) otherwise. More...
 
LIBLAX_EXTERN void XMLNode_free (XMLNode_t *node)
 Destroys this XMLNode_t structure. More...
 
LIBLAX_EXTERN const XMLAttributes_tXMLNode_getAttributes (const XMLNode_t *node)
 Returns the attributes of this element. More...
 
LIBLAX_EXTERN int XMLNode_getAttributesLength (const XMLNode_t *node)
 Return the number of attributes in the attributes set. More...
 
LIBLAX_EXTERN int XMLNode_getAttrIndex (const XMLNode_t *node, const char *name, const char *uri)
 Return the index of an attribute with the given local name and namespace URI. More...
 
LIBLAX_EXTERN int XMLNode_getAttrIndexByTriple (const XMLNode_t *node, const XMLTriple_t *triple)
 Return the index of an attribute with the given XMLTriple_t. More...
 
LIBLAX_EXTERN char * XMLNode_getAttrName (const XMLNode_t *node, int index)
 Return the local name of an attribute in the attributes set in this XMLNode_t (by position). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrPrefix (const XMLNode_t *node, int index)
 Return the prefix of an attribute in the attribute set in this XMLNode_t (by position). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrPrefixedName (const XMLNode_t *node, int index)
 Return the prefixed name of an attribute in the attribute set in this XMLNode_t (by position). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrURI (const XMLNode_t *node, int index)
 Return the namespace URI of an attribute in the attribute set in this XMLNode_t (by position). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrValue (const XMLNode_t *node, int index)
 Return the value of an attribute in the attribute set in this XMLNode_t (by position). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrValueByName (const XMLNode_t *node, const char *name)
 Return a value of an attribute with the given local name (without namespace URI). More...
 
LIBLAX_EXTERN char * XMLNode_getAttrValueByNS (const XMLNode_t *node, const char *name, const char *uri)
 Return a value of an attribute with the given local name and namespace URI. More...
 
LIBLAX_EXTERN char * XMLNode_getAttrValueByTriple (const XMLNode_t *node, const XMLTriple_t *triple)
 Return a value of an attribute with the given XMLTriple_t. More...
 
LIBLAX_EXTERN const char * XMLNode_getCharacters (const XMLNode_t *node)
 Returns the text of this element. More...
 
LIBLAX_EXTERN const XMLNode_tXMLNode_getChild (const XMLNode_t *node, const int n)
 Returns the nth child of this XMLNode_t structure. More...
 
LIBLAX_EXTERN const XMLNode_tXMLNode_getChildForName (const XMLNode_t *node, const char *name)
 Returns the first child of the XMLNode_t structure node with the given name. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_getChildForNameNC (XMLNode_t *node, const char *name)
 Returns the (non-const) the first child of the XMLNode_t structure node with the given name. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_getChildNC (XMLNode_t *node, const unsigned int n)
 Returns the (non-const) nth child of this XMLNode_t structure. More...
 
LIBLAX_EXTERN int XMLNode_getIndex (const XMLNode_t *node, const char *name)
 Return the index of the first child of the XMLNode_t structure node with the given name. More...
 
LIBLAX_EXTERN const char * XMLNode_getName (const XMLNode_t *node)
 Returns the (unqualified) name of this XML element. More...
 
LIBLAX_EXTERN int XMLNode_getNamespaceIndex (const XMLNode_t *node, const char *uri)
 Look up the index of an XML namespace declaration by URI. More...
 
LIBLAX_EXTERN int XMLNode_getNamespaceIndexByPrefix (const XMLNode_t *node, const char *prefix)
 Look up the index of an XML namespace declaration by prefix. More...
 
LIBLAX_EXTERN char * XMLNode_getNamespacePrefix (const XMLNode_t *node, int index)
 Look up the prefix of an XML namespace declaration by position. More...
 
LIBLAX_EXTERN char * XMLNode_getNamespacePrefixByURI (const XMLNode_t *node, const char *uri)
 Look up the prefix of an XML namespace declaration by its URI. More...
 
LIBLAX_EXTERN const XMLNamespaces_tXMLNode_getNamespaces (const XMLNode_t *node)
 Returns the XML namespace declarations for this XML element. More...
 
LIBLAX_EXTERN int XMLNode_getNamespacesLength (const XMLNode_t *node)
 Returns the number of XML namespaces stored in the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN char * XMLNode_getNamespaceURI (const XMLNode_t *node, int index)
 Look up the URI of an XML namespace declaration by its position. More...
 
LIBLAX_EXTERN char * XMLNode_getNamespaceURIByPrefix (const XMLNode_t *node, const char *prefix)
 Look up the URI of an XML namespace declaration by its prefix. More...
 
LIBLAX_EXTERN unsigned int XMLNode_getNumChildren (const XMLNode_t *node)
 Returns the number of children for this XMLNode_t structure. More...
 
LIBLAX_EXTERN const char * XMLNode_getPrefix (const XMLNode_t *node)
 Returns the namespace prefix of this XML element. More...
 
LIBLAX_EXTERN const char * XMLNode_getURI (const XMLNode_t *node)
 Returns the namespace URI of this XML element. More...
 
LIBLAX_EXTERN int XMLNode_hasAttr (const XMLNode_t *node, int index)
 Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given index exists in the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasAttrWithName (const XMLNode_t *node, const char *name)
 Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasAttrWithNS (const XMLNode_t *node, const char *name, const char *uri)
 Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasAttrWithTriple (const XMLNode_t *node, const XMLTriple_t *triple)
 Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given XML triple exists in the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasChild (const XMLNode_t *node, const char *name)
 \* Return 1 (true) or 0 (false) indicating whether node has a child with the given name. More...
 
LIBLAX_EXTERN int XMLNode_hasNamespaceNS (const XMLNode_t *node, const char *uri, const char *prefix)
 Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasNamespacePrefix (const XMLNode_t *node, const char *prefix)
 Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given prefix is contained in the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_hasNamespaceURI (const XMLNode_t *node, const char *uri)
 Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given URI is contained in the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_insertChild (XMLNode_t *node, unsigned int n, const XMLNode_t *child)
 Inserts a copy of child node to this XMLNode_t structure. More...
 
LIBLAX_EXTERN int XMLNode_isAttributesEmpty (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether the attribute set in this XMLNode_t set is empty. More...
 
LIBLAX_EXTERN int XMLNode_isElement (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML element. More...
 
LIBLAX_EXTERN int XMLNode_isEnd (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML end element. More...
 
LIBLAX_EXTERN int XMLNode_isEndFor (const XMLNode_t *node, const XMLNode_t *element)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML end element for the given start element. More...
 
LIBLAX_EXTERN int XMLNode_isEOF (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an end of file marker. More...
 
LIBLAX_EXTERN int XMLNode_isNamespacesEmpty (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether the XMLNamespaces_t of this XMLNode_t is empty. More...
 
LIBLAX_EXTERN int XMLNode_isStart (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML start element. More...
 
LIBLAX_EXTERN int XMLNode_isText (const XMLNode_t *node)
 Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML text element. More...
 
LIBLAX_EXTERN int XMLNode_removeAttr (XMLNode_t *node, int n)
 Removes an attribute with the given index from the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_removeAttrByName (XMLNode_t *node, const char *name)
 Removes an attribute with the given local name (without namespace URI) from the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_removeAttrByNS (XMLNode_t *node, const char *name, const char *uri)
 Removes an attribute with the given local name and namespace URI from the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_removeAttrByTriple (XMLNode_t *node, const XMLTriple_t *triple)
 Removes an attribute with the given XMLTriple_t from the attribute set in this XMLNode_t. More...
 
LIBLAX_EXTERN XMLNode_tXMLNode_removeChild (XMLNode_t *node, unsigned int n)
 Removes the nth child of this XMLNode_t and returned the removed node. More...
 
LIBLAX_EXTERN int XMLNode_removeChildren (XMLNode_t *node)
 Removes all children from this node. More...
 
LIBLAX_EXTERN int XMLNode_removeNamespace (XMLNode_t *node, int index)
 Removes an XML Namespace stored in the given position of the XMLNamespaces_t of this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_removeNamespaceByPrefix (XMLNode_t *node, const char *prefix)
 Removes an XML Namespace with the given prefix. More...
 
LIBLAX_EXTERN int XMLNode_setAttributes (XMLNode_t *node, const XMLAttributes_t *attributes)
 Sets an XMLAttributes_t to this XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_setEnd (XMLNode_t *node)
 Declares this XML start element is also an end element. More...
 
LIBLAX_EXTERN int XMLNode_setEOF (XMLNode_t *node)
 Declares this XMLNode_t structure is an end-of-file (input) marker. More...
 
LIBLAX_EXTERN int XMLNode_setNamespaces (XMLNode_t *node, const XMLNamespaces_t *namespaces)
 Sets an XMLnamespaces_t to this XML element. More...
 
LIBLAX_EXTERN int XMLNode_setTriple (XMLNode_t *node, const XMLTriple_t *triple)
 Sets the XMLTripe_t (name, uri and prefix) of this XML element. More...
 
LIBLAX_EXTERN char * XMLNode_toXMLString (const XMLNode_t *node)
 Returns a string which is converted from a given XMLNode_t. More...
 
LIBLAX_EXTERN int XMLNode_unsetEnd (XMLNode_t *node)
 Declares this XML start/end element is no longer an end element. More...
 

Member Function Documentation

LIBLAX_EXTERN int XMLNode_addAttr ( XMLNode_t node,
const char *  name,
const char *  value 
)

Adds an attribute with the given local name to the attribute set in this XMLNode_t.

(namespace URI and prefix are empty) Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to which an attribute to be added.
namea string, the local name of the attribute.
valuea string, the value of the attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
if the local name without namespace URI already exists in the attribute set, its value will be replaced.
LIBLAX_EXTERN int XMLNode_addAttrWithNS ( XMLNode_t node,
const char *  name,
const char *  value,
const char *  namespaceURI,
const char *  prefix 
)

Adds an attribute with a prefix and namespace URI to the attribute set in this XMLNode_t optionally Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to which an attribute to be added.
namea string, the local name of the attribute.
valuea string, the value of the attribute.
namespaceURIa string, the namespace URI of the attribute.
prefixa string, the prefix of the namespace.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
if local name with the same namespace URI already exists in the attribute set, its value and prefix will be replaced.
LIBLAX_EXTERN int XMLNode_addAttrWithTriple ( XMLNode_t node,
const XMLTriple_t triple,
const char *  value 
)

Adds an attribute with the given XMLTriple_t/value pair to the attribute set in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Note
if local name with the same namespace URI already exists in the attribute set, its value and prefix will be replaced.
Parameters
nodeXMLNode_t structure to which an attribute to be added.
triplean XMLTriple_t, the XML triple of the attribute.
valuea string, the value of the attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_addChild ( XMLNode_t node,
const XMLNode_t child 
)

Adds a copy of child node to this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to which child is to be added.
childXMLNode_t structure to be added as child.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Examples:
addingEvidenceCodes_2.c, and createExampleSBML.c.
LIBLAX_EXTERN int XMLNode_addNamespace ( XMLNode_t node,
const char *  uri,
const char *  prefix 
)

Appends an XML namespace prefix and URI pair to this XMLNode_t.

If there is an XML namespace with the given prefix in this XMLNode_t, then the existing XML namespace will be overwritten by the new one. Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to be queried.
uria string, the uri for the namespace.
prefixa string, the prefix for the namespace.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_clearAttributes ( XMLNode_t node)

Clears (deletes) all attributes in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure from which attributes to be cleared.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_clearNamespaces ( XMLNode_t node)

Clears (deletes) all XML namespace declarations in the XMLNamespaces_t of this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN XMLNode_t * XMLNode_clone ( const XMLNode_t n)

Creates a deep copy of the given XMLNode_t structure.

Parameters
nthe XMLNode_t structure to be copied.
Returns
a (deep) copy of the given XMLNode_t structure.
LIBLAX_EXTERN XMLNode_t * XMLNode_convertStringToXMLNode ( const char *  xml,
const XMLNamespaces_t xmlns 
)

Returns an XMLNode_t pointer which is converted from a given string containing XML content.

XMLNamespaces_t (the second argument) must be given if the corresponding xmlns attribute is not included in the string of the first argument.

Parameters
xmlstring to be converted to a XML node.
xmlnsXMLNamespaces_t structure the namespaces to set.
Returns
pointer to XMLNode_t structure which is converted from a given string.
LIBLAX_EXTERN const char * XMLNode_convertXMLNodeToString ( const XMLNode_t node)

Returns a string which is converted from a given XMLNode_t.

Parameters
nodeXMLNode_t to be converted to a string.
Returns
a string (char*) which is converted from a given XMLNode_t.
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN XMLNode_t * XMLNode_create ( void  )

Creates a new empty XMLNode_t structure with no children and returns a pointer to it.

Returns
pointer to the new XMLNode_t structure.
LIBLAX_EXTERN XMLNode_t * XMLNode_createEndElement ( const XMLTriple_t triple)

Creates a new end element XMLNode_t structure with XMLTriple_t structure set and returns a pointer to it.

Parameters
tripleXMLTriple_t structure to be set.
Returns
pointer to new XMLNode_t structure.
LIBLAX_EXTERN XMLNode_t * XMLNode_createFromToken ( const XMLToken_t token)

Creates a new XMLNode_t structure by copying token and returns a pointer to it.

Parameters
tokenXMLToken_t structure to be copied to XMLNode_t structure.
Returns
pointer to the new XMLNode_t structure.
Examples:
addingEvidenceCodes_2.c.
LIBLAX_EXTERN XMLNode_t * XMLNode_createStartElement ( const XMLTriple_t triple,
const XMLAttributes_t attr 
)

Creates a new start element XMLNode_t structure with XMLTriple_t and XMLAttributes_t structures set and returns a pointer to it.

Parameters
tripleXMLTriple_t structure to be set.
attrXMLAttributes_t structure to be set.
Returns
pointer to new XMLNode_t structure.
Examples:
createExampleSBML.c.
LIBLAX_EXTERN XMLNode_t * XMLNode_createStartElementNS ( const XMLTriple_t triple,
const XMLAttributes_t attr,
const XMLNamespaces_t ns 
)

Creates a new start element XMLNode_t structure with XMLTriple_t, XMLAttributes_t and XMLNamespaces_t structures set and returns a pointer to it.

Parameters
tripleXMLTriple_t structure to be set.
attrXMLAttributes_t structure to be set.
nsXMLNamespaces_t structure to be set.
Returns
pointer to new XMLNode_t structure.
LIBLAX_EXTERN XMLNode_t * XMLNode_createTextNode ( const char *  text)

Creates a text XMLNode_t.

Defaults to creating the node with a line number of 0 and a column number of 0.

Parameters
textthe text to be added to the XMLToken_t.
Examples:
createExampleSBML.c.
LIBLAX_EXTERN int XMLNode_equals ( const XMLNode_t node,
const XMLNode_t other 
)

Compare one XMLNode_t against another XMLNode_t returning 1 (true) if both nodes represent the same XML tree, or 0 (false) otherwise.

Parameters
nodethe original XMLNode_t structure.
otheranother XMLNode_t to compare against.
Returns
1 (true) if both nodes represent the same XML tree, or 0 (false) otherwise
LIBLAX_EXTERN void XMLNode_free ( XMLNode_t node)

Destroys this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to be freed.
LIBLAX_EXTERN const XMLAttributes_t * XMLNode_getAttributes ( const XMLNode_t node)

Returns the attributes of this element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the XMLAttributes_t of this XML element.
LIBLAX_EXTERN int XMLNode_getAttributesLength ( const XMLNode_t node)

Return the number of attributes in the attributes set.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the number of attributes in the attributes set in this XMLNode_t.
LIBLAX_EXTERN int XMLNode_getAttrIndex ( const XMLNode_t node,
const char *  name,
const char *  uri 
)

Return the index of an attribute with the given local name and namespace URI.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the local name of the attribute.
uria string, the namespace URI of the attribute.
Returns
the index of an attribute with the given local name and namespace URI, or -1 if not present.
LIBLAX_EXTERN int XMLNode_getAttrIndexByTriple ( const XMLNode_t node,
const XMLTriple_t triple 
)

Return the index of an attribute with the given XMLTriple_t.

Parameters
nodeXMLNode_t structure to be queried.
triplean XMLTriple_t, the XML triple of the attribute for which the index is required.
Returns
the index of an attribute with the given XMLTriple_t, or -1 if not present.
LIBLAX_EXTERN char * XMLNode_getAttrName ( const XMLNode_t node,
int  index 
)

Return the local name of an attribute in the attributes set in this XMLNode_t (by position).

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute whose local name is required.
Returns
the local name of an attribute in this list (by position).
Note
If index is out of range, an empty string will be returned. Use XMLNode_hasAttr() to test for the attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrPrefix ( const XMLNode_t node,
int  index 
)

Return the prefix of an attribute in the attribute set in this XMLNode_t (by position).

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute whose prefix is required.
Returns
the namespace prefix of an attribute in the attribute set (by position).
Note
If index is out of range, an empty string will be returned. Use XMLNode_hasAttr() to test for the attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrPrefixedName ( const XMLNode_t node,
int  index 
)

Return the prefixed name of an attribute in the attribute set in this XMLNode_t (by position).

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute whose prefixed name is required.
Returns
the prefixed name of an attribute in the attribute set (by position).
Note
If index is out of range, an empty string will be returned. Use XMLNode_hasAttr() to test for attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrURI ( const XMLNode_t node,
int  index 
)

Return the namespace URI of an attribute in the attribute set in this XMLNode_t (by position).

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute whose namespace URI is required.
Returns
the namespace URI of an attribute in the attribute set (by position).
Note
If index is out of range, an empty string will be returned. Use XMLNode_hasAttr(index) to test for attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrValue ( const XMLNode_t node,
int  index 
)

Return the value of an attribute in the attribute set in this XMLNode_t (by position).

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute whose value is required.
Returns
the value of an attribute in the attribute set (by position).
Note
If index is out of range, an empty string will be returned. Use XMLNode_hasAttr() to test for attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrValueByName ( const XMLNode_t node,
const char *  name 
)

Return a value of an attribute with the given local name (without namespace URI).

Parameters
nodeXMLNode_t structure to be queried.
namea string, the local name of the attribute whose value is required.
Returns
The attribute value as a string.
Note
If an attribute with the given local name (without namespace URI) does not exist, an empty string will be returned. Use XMLNode_hasAttr() to test for attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrValueByNS ( const XMLNode_t node,
const char *  name,
const char *  uri 
)

Return a value of an attribute with the given local name and namespace URI.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the local name of the attribute whose value is required.
uria string, the namespace URI of the attribute.
Returns
The attribute value as a string.
Note
If an attribute with the given local name and namespace URI does not exist, an empty string will be returned. Use XMLNode_hasAttr(name, uri) to test for attribute existence.
LIBLAX_EXTERN char * XMLNode_getAttrValueByTriple ( const XMLNode_t node,
const XMLTriple_t triple 
)

Return a value of an attribute with the given XMLTriple_t.

Parameters
nodeXMLNode_t structure to be queried.
triplean XMLTriple_t, the XML triple of the attribute whose value is required.
Returns
The attribute value as a string.
Note
If an attribute with the given XMLTriple_t does not exist, an empty string will be returned. Use XMLNode_hasAttr() to test for attribute existence.
LIBLAX_EXTERN const char * XMLNode_getCharacters ( const XMLNode_t node)

Returns the text of this element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the characters of this XML text.
LIBLAX_EXTERN const XMLNode_t * XMLNode_getChild ( const XMLNode_t node,
const int  n 
)

Returns the nth child of this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to be queried.
nthe index of the node to return.
Returns
the nth child of this XMLNode_t structure. If the index n is invalid, NULL is returned.
LIBLAX_EXTERN const XMLNode_t * XMLNode_getChildForName ( const XMLNode_t node,
const char *  name 
)

Returns the first child of the XMLNode_t structure node with the given name.

If no child with corrsponding name can be found, this method returns an empty node.

Parameters
nodeXMLNode_t structure to be queried.
namethe name of the node to return.
Returns
the first child of this XMLNode_t with given name.
LIBLAX_EXTERN XMLNode_t * XMLNode_getChildForNameNC ( XMLNode_t node,
const char *  name 
)

Returns the (non-const) the first child of the XMLNode_t structure node with the given name.

If no child with corrsponding name can be found, this method returns an empty node.

Parameters
nodeXMLNode_t structure to be queried.
namethe name of the node to return.
Returns
the first child of this XMLNode_t with given name.
LIBLAX_EXTERN XMLNode_t * XMLNode_getChildNC ( XMLNode_t node,
const unsigned int  n 
)

Returns the (non-const) nth child of this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to be queried.
nthe index of the node to return.
Returns
the non-const nth child of this XMLNode_t structure.
LIBLAX_EXTERN int XMLNode_getIndex ( const XMLNode_t node,
const char *  name 
)

Return the index of the first child of the XMLNode_t structure node with the given name.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the name of the child for which the index is required.
Returns
the index of the first child of node with the given name, or -1 if not present.
LIBLAX_EXTERN const char * XMLNode_getName ( const XMLNode_t node)

Returns the (unqualified) name of this XML element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the (unqualified) name of this XML element.
LIBLAX_EXTERN int XMLNode_getNamespaceIndex ( const XMLNode_t node,
const char *  uri 
)

Look up the index of an XML namespace declaration by URI.

Parameters
nodeXMLNode_t structure to be queried.
uria string, uri of the required namespace.
Returns
the index of the given declaration, or -1 if not present.
LIBLAX_EXTERN int XMLNode_getNamespaceIndexByPrefix ( const XMLNode_t node,
const char *  prefix 
)

Look up the index of an XML namespace declaration by prefix.

Parameters
nodeXMLNode_t structure to be queried.
prefixa string, prefix of the required namespace.
Returns
the index of the given declaration, or -1 if not present.
LIBLAX_EXTERN char * XMLNode_getNamespacePrefix ( const XMLNode_t node,
int  index 
)

Look up the prefix of an XML namespace declaration by position.

Callers should use getNamespacesLength() to find out how many namespaces are stored in the XMLNamespaces_t.

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, position of the removed namespace.
Returns
the prefix of an XML namespace declaration in the XMLNamespaces_t (by position).
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN char * XMLNode_getNamespacePrefixByURI ( const XMLNode_t node,
const char *  uri 
)

Look up the prefix of an XML namespace declaration by its URI.

Parameters
nodeXMLNode_t structure to be queried.
uria string, uri of the required namespace.
Returns
the prefix of an XML namespace declaration given its URI.
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN const XMLNamespaces_t * XMLNode_getNamespaces ( const XMLNode_t node)

Returns the XML namespace declarations for this XML element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the XML namespace declarations for this XML element.
LIBLAX_EXTERN int XMLNode_getNamespacesLength ( const XMLNode_t node)

Returns the number of XML namespaces stored in the XMLNamespaces_t of this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the number of namespaces in this list.
LIBLAX_EXTERN char * XMLNode_getNamespaceURI ( const XMLNode_t node,
int  index 
)

Look up the URI of an XML namespace declaration by its position.

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, position of the removed namespace.
Returns
the URI of an XML namespace declaration in the XMLNamespaces_t (by position).
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN char * XMLNode_getNamespaceURIByPrefix ( const XMLNode_t node,
const char *  prefix 
)

Look up the URI of an XML namespace declaration by its prefix.

Parameters
nodeXMLNode_t structure to be queried.
prefixa string, prefix of the required namespace.
Returns
the URI of an XML namespace declaration given its prefix.
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN unsigned int XMLNode_getNumChildren ( const XMLNode_t node)

Returns the number of children for this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the number of children for this XMLNode_t structure.
LIBLAX_EXTERN const char * XMLNode_getPrefix ( const XMLNode_t node)

Returns the namespace prefix of this XML element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the namespace prefix of this XML element.
Note
If no prefix exists, an empty string will be return.
LIBLAX_EXTERN const char * XMLNode_getURI ( const XMLNode_t node)

Returns the namespace URI of this XML element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
the namespace URI of this XML element.
LIBLAX_EXTERN int XMLNode_hasAttr ( const XMLNode_t node,
int  index 
)

Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given index exists in the attribute set in this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, the position of the attribute.
Returns
1 (true) if an attribute with the given index exists in the attribute set in this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasAttrWithName ( const XMLNode_t node,
const char *  name 
)

Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the local name of the attribute.
Returns
1 (true) if an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasAttrWithNS ( const XMLNode_t node,
const char *  name,
const char *  uri 
)

Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the local name of the attribute.
uria string, the namespace URI of the attribute.
Returns
1 (true) if an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasAttrWithTriple ( const XMLNode_t node,
const XMLTriple_t triple 
)

Predicate returning 1 (true) or 0 (false) depending on whether an attribute with the given XML triple exists in the attribute set in this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
triplean XMLTriple_t, the XML triple of the attribute.
Returns
1 (true) if an attribute with the given XML triple exists in the attribute set in this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasChild ( const XMLNode_t node,
const char *  name 
)

\* Return 1 (true) or 0 (false) indicating whether node has a child with the given name.

Parameters
nodeXMLNode_t structure to be queried.
namea string, the name of the child to be checked.
Returns
1 (true) if this node has a child with the given name 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasNamespaceNS ( const XMLNode_t node,
const char *  uri,
const char *  prefix 
)

Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces_t of this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
uria string, the uri for the namespace.
prefixa string, the prefix for the namespace.
Returns
1 (true) if an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces_t of this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasNamespacePrefix ( const XMLNode_t node,
const char *  prefix 
)

Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given prefix is contained in the XMLNamespaces_t of this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
prefixa string, the prefix for the namespace.
Returns
1 (true) if an XML Namespace with the given URI is contained in the XMLNamespaces_t of this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_hasNamespaceURI ( const XMLNode_t node,
const char *  uri 
)

Predicate returning 1 (true) or 0 (false) depending on whether an XML Namespace with the given URI is contained in the XMLNamespaces_t of this XMLNode_t.

Parameters
nodeXMLNode_t structure to be queried.
uria string, the uri for the namespace.
Returns
1 (true) if an XML Namespace with the given URI is contained in the XMLNamespaces_t of this XMLNode_t, 0 (false) otherwise.
LIBLAX_EXTERN XMLNode_t * XMLNode_insertChild ( XMLNode_t node,
unsigned int  n,
const XMLNode_t child 
)

Inserts a copy of child node to this XMLNode_t structure.

Parameters
nodeXMLNode_t structure to which child is to be added.
nthe index at which the given node is inserted.
childXMLNode_t structure to be inserted as nth child.
Returns
the newly inserted child in this XMLNode_t. NULL will be returned if the given child is NULL.
LIBLAX_EXTERN int XMLNode_isAttributesEmpty ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether the attribute set in this XMLNode_t set is empty.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if the attribute set in this XMLNode_t is empty, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isElement ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if this XMLNode_t structure is an XML element, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isEnd ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML end element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if this XMLNode_t structure is an XML end element, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isEndFor ( const XMLNode_t node,
const XMLNode_t element 
)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML end element for the given start element.

Parameters
nodeXMLNode_t structure to be queried.
elementXMLNode_t structure, element for which query is made.
Returns
1 (true) if this XMLNode_t structure is an XML end element for the given XMLNode_t structure start element, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isEOF ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an end of file marker.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if this XMLNode_t structure is an end of file (input) marker, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isNamespacesEmpty ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether the XMLNamespaces_t of this XMLNode_t is empty.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if the XMLNamespaces_t of this XMLNode_t is empty, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isStart ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML start element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if this XMLNode_t structure is an XML start element, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_isText ( const XMLNode_t node)

Predicate returning 1 (true) or 0 (false) depending on whether this XMLNode_t structure is an XML text element.

Parameters
nodeXMLNode_t structure to be queried.
Returns
1 (true) if this XMLNode_t structure is an XML text element, 0 (false) otherwise.
LIBLAX_EXTERN int XMLNode_removeAttr ( XMLNode_t node,
int  n 
)

Removes an attribute with the given index from the attribute set in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure from which an attribute to be removed.
nan integer the index of the resource to be deleted.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_removeAttrByName ( XMLNode_t node,
const char *  name 
)

Removes an attribute with the given local name (without namespace URI) from the attribute set in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure from which an attribute to be removed.
namea string, the local name of the attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_removeAttrByNS ( XMLNode_t node,
const char *  name,
const char *  uri 
)

Removes an attribute with the given local name and namespace URI from the attribute set in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure from which an attribute to be removed.
namea string, the local name of the attribute.
uria string, the namespace URI of the attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_removeAttrByTriple ( XMLNode_t node,
const XMLTriple_t triple 
)

Removes an attribute with the given XMLTriple_t from the attribute set in this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure from which an attribute to be removed.
triplean XMLTriple_t, the XML triple of the attribute.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN XMLNode_t * XMLNode_removeChild ( XMLNode_t node,
unsigned int  n 
)

Removes the nth child of this XMLNode_t and returned the removed node.

Parameters
nodeXMLNode_t structure to which child is to be removed.
nthe index of the node to be removed.
Returns
the removed child, or NULL if the given index is out of range.
Note
This function invalidates all existing references to child nodes after the position or first.
LIBLAX_EXTERN int XMLNode_removeChildren ( XMLNode_t node)

Removes all children from this node.

Parameters
nodeXMLNode_t structure whose children to remove.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_removeNamespace ( XMLNode_t node,
int  index 
)

Removes an XML Namespace stored in the given position of the XMLNamespaces_t of this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to be queried.
indexan integer, position of the removed namespace.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_removeNamespaceByPrefix ( XMLNode_t node,
const char *  prefix 
)

Removes an XML Namespace with the given prefix.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to be queried.
prefixa string, prefix of the required namespace.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_setAttributes ( XMLNode_t node,
const XMLAttributes_t attributes 
)

Sets an XMLAttributes_t to this XMLNode_t.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to which attributes to be set.
attributesXMLAttributes_t to be set to this XMLNode_t.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
This function replaces the existing XMLAttributes_t with the new one.
LIBLAX_EXTERN int XMLNode_setEnd ( XMLNode_t node)

Declares this XML start element is also an end element.

Parameters
nodeXMLNode_t structure to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_setEOF ( XMLNode_t node)

Declares this XMLNode_t structure is an end-of-file (input) marker.

Parameters
nodeXMLNode_t structure to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN int XMLNode_setNamespaces ( XMLNode_t node,
const XMLNamespaces_t namespaces 
)

Sets an XMLnamespaces_t to this XML element.

Nothing will be done if this XMLNode_t is not a start element.

Parameters
nodeXMLNode_t structure to be queried.
namespacesXMLNamespaces_t to be set to this XMLNode_t.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
Note
This function replaces the existing XMLNamespaces_t with the new one.
LIBLAX_EXTERN int XMLNode_setTriple ( XMLNode_t node,
const XMLTriple_t triple 
)

Sets the XMLTripe_t (name, uri and prefix) of this XML element.

Nothing will be done if this XML element is a text node.

Parameters
nodeXMLNode_t structure to which the triple to be added.
triplean XMLTriple_t, the XML triple to be set to this XML element.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are:
LIBLAX_EXTERN char * XMLNode_toXMLString ( const XMLNode_t node)

Returns a string which is converted from a given XMLNode_t.

Parameters
nodeXMLNode_t to be converted to a string.
Returns
a string (char*) which is converted from a given XMLNode_t.
Note
returned char* should be freed with safe_free() by the caller.
LIBLAX_EXTERN int XMLNode_unsetEnd ( XMLNode_t node)

Declares this XML start/end element is no longer an end element.

Parameters
nodeXMLNode_t structure to be set.
Returns
integer value indicating success/failure of the function. The value is drawn from the enumeration OperationReturnValues_t. The possible values returned by this function are: