A node in an XML document tree.

Functions | |
| static const string | trim (const string &s) |
| 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. | |
| 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 optionally Nothing will be done if this XMLNode is not a start element. | |
| LIBLAX_EXTERN int | XMLNode_addAttrWithTriple (XMLNode_t *node, const XMLTriple_t *triple, const char *value) |
| Adds an attribute with the given XMLTriple/value pair to the attribute set in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_addChild (XMLNode_t *node, const XMLNode_t *child) |
| Adds a copy of child node to this XMLNode_t structure. | |
| 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. | |
| LIBLAX_EXTERN int | XMLNode_clearAttributes (XMLNode_t *node) |
| Clears (deletes) all attributes in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_clearNamespaces (XMLNode_t *node) |
| Clears (deletes) all XML namespace declarations in the XMLNamespaces of this XMLNode. | |
| LIBLAX_EXTERN XMLNode_t * | XMLNode_clone (const XMLNode_t *n) |
| Creates 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. | |
| LIBLAX_EXTERN const char * | XMLNode_convertXMLNodeToString (const XMLNode_t *node) |
| Returns a string which is converted from a given XMLNode. | |
| LIBLAX_EXTERN XMLNode_t * | XMLNode_create (void) |
| Creates a new empty XMLNode_t structure with no children and returns a pointer to it. | |
| 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. | |
| 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. | |
| 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. | |
| 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. | |
| LIBLAX_EXTERN XMLNode_t * | XMLNode_createTextNode (const char *text) |
| LIBLAX_EXTERN int | XMLNode_equals (const XMLNode_t *node, const XMLNode_t *other) |
| Compare one XMLNode against another XMLNode returning true (non-zero) if both nodes represent the same XML tree, or false (zero) otherwise. | |
| LIBLAX_EXTERN void | XMLNode_free (XMLNode_t *node) |
| Destroys this XMLNode_t structure. | |
| LIBLAX_EXTERN const XMLAttributes_t * | XMLNode_getAttributes (const XMLNode_t *node) |
| Returns the attributes of this element. | |
| LIBLAX_EXTERN int | XMLNode_getAttributesLength (const XMLNode_t *node) |
| Return the number of attributes in the attributes set. | |
| 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. | |
| LIBLAX_EXTERN int | XMLNode_getAttrIndexByTriple (const XMLNode_t *node, const XMLTriple_t *triple) |
| Return the index of an attribute with the given XMLTriple. | |
| 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 (by position). | |
| LIBLAX_EXTERN char * | XMLNode_getAttrPrefix (const XMLNode_t *node, int index) |
| Return the prefix of an attribute in the attribute set in this XMLNode (by position). | |
| 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 (by position). | |
| 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 (by position). | |
| LIBLAX_EXTERN char * | XMLNode_getAttrValue (const XMLNode_t *node, int index) |
| Return the value of an attribute in the attribute set in this XMLNode (by position). | |
| 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). | |
| 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. | |
| LIBLAX_EXTERN char * | XMLNode_getAttrValueByTriple (const XMLNode_t *node, const XMLTriple_t *triple) |
| Return a value of an attribute with the given XMLTriple. | |
| LIBLAX_EXTERN const char * | XMLNode_getCharacters (const XMLNode_t *node) |
| Returns the text of this element. | |
| LIBLAX_EXTERN const XMLNode_t * | XMLNode_getChild (const XMLNode_t *node, const int n) |
| Returns the nth child of this XMLNode_t structure. | |
| 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. | |
| 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. | |
| LIBLAX_EXTERN XMLNode_t * | XMLNode_getChildNC (XMLNode_t *node, const unsigned int n) |
| 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. | |
| LIBLAX_EXTERN const char * | XMLNode_getName (const XMLNode_t *node) |
| 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. | |
| LIBLAX_EXTERN int | XMLNode_getNamespaceIndexByPrefix (const XMLNode_t *node, const char *prefix) |
| Look up the index of an XML namespace declaration by prefix. | |
| LIBLAX_EXTERN char * | XMLNode_getNamespacePrefix (const XMLNode_t *node, int index) |
| Look up the prefix of an XML namespace declaration by position. | |
| LIBLAX_EXTERN char * | XMLNode_getNamespacePrefixByURI (const XMLNode_t *node, const char *uri) |
| Look up the prefix of an XML namespace declaration by its URI. | |
| LIBLAX_EXTERN const XMLNamespaces_t * | XMLNode_getNamespaces (const XMLNode_t *node) |
| 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 of this XMLNode. | |
| LIBLAX_EXTERN char * | XMLNode_getNamespaceURI (const XMLNode_t *node, int index) |
| Look up the URI of an XML namespace declaration by its position. | |
| LIBLAX_EXTERN char * | XMLNode_getNamespaceURIByPrefix (const XMLNode_t *node, const char *prefix) |
| Look up the URI of an XML namespace declaration by its prefix. | |
| LIBLAX_EXTERN unsigned int | XMLNode_getNumChildren (const XMLNode_t *node) |
| 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. | |
| LIBLAX_EXTERN const char * | XMLNode_getURI (const XMLNode_t *node) |
| Returns the namespace URI of this XML element. | |
| LIBLAX_EXTERN int | XMLNode_hasAttr (const XMLNode_t *node, int index) |
Predicate returning true or false depending on whether an attribute with the given index exists in the attribute set in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasAttrWithName (const XMLNode_t *node, const char *name) |
Predicate returning true or false depending on whether an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasAttrWithNS (const XMLNode_t *node, const char *name, const char *uri) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasAttrWithTriple (const XMLNode_t *node, const XMLTriple_t *triple) |
Predicate returning true or false depending on whether an attribute with the given XML triple exists in the attribute set in this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasChild (const XMLNode_t *node, const char *name) |
| Return a boolean indicating whether node has a child with the given name. | |
| LIBLAX_EXTERN int | XMLNode_hasNamespaceNS (const XMLNode_t *node, const char *uri, const char *prefix) |
Predicate returning true or false depending on whether an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces of this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasNamespacePrefix (const XMLNode_t *node, const char *prefix) |
Predicate returning true or false depending on whether an XML Namespace with the given prefix is contained in the XMLNamespaces of this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_hasNamespaceURI (const XMLNode_t *node, const char *uri) |
Predicate returning true or false depending on whether an XML Namespace with the given URI is contained in the XMLNamespaces of this XMLNode. | |
| 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. | |
| LIBLAX_EXTERN int | XMLNode_isAttributesEmpty (const XMLNode_t *node) |
Predicate returning true or false depending on whether the attribute set in this XMLNode set is empty. | |
| LIBLAX_EXTERN int | XMLNode_isElement (const XMLNode_t *node) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML element. | |
| LIBLAX_EXTERN int | XMLNode_isEnd (const XMLNode_t *node) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML end element. | |
| LIBLAX_EXTERN int | XMLNode_isEndFor (const XMLNode_t *node, const XMLNode_t *element) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML end element for the given start element. | |
| LIBLAX_EXTERN int | XMLNode_isEOF (const XMLNode_t *node) |
Predicate returning true or false depending on whether this XMLNode_t structure is an end of file marker. | |
| LIBLAX_EXTERN int | XMLNode_isNamespacesEmpty (const XMLNode_t *node) |
Predicate returning true or false depending on whether the XMLNamespaces of this XMLNode is empty. | |
| LIBLAX_EXTERN int | XMLNode_isStart (const XMLNode_t *node) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML start element. | |
| LIBLAX_EXTERN int | XMLNode_isText (const XMLNode_t *node) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML text element. | |
| LIBLAX_EXTERN int | XMLNode_removeAttr (XMLNode_t *node, int n) |
| Removes an attribute with the given index from the attribute set in this XMLNode. | |
| 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. | |
| 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. | |
| LIBLAX_EXTERN int | XMLNode_removeAttrByTriple (XMLNode_t *node, const XMLTriple_t *triple) |
| Removes an attribute with the given XMLTriple from the attribute set in this XMLNode. | |
| LIBLAX_EXTERN XMLNode_t * | XMLNode_removeChild (XMLNode_t *node, unsigned int n) |
| Removes the nth child of this XMLNode and returned the removed node. | |
| LIBLAX_EXTERN int | XMLNode_removeChildren (XMLNode_t *node) |
| Removes all children from this node. | |
| LIBLAX_EXTERN int | XMLNode_removeNamespace (XMLNode_t *node, int index) |
| Removes an XML Namespace stored in the given position of the XMLNamespaces of this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_removeNamespaceByPrefix (XMLNode_t *node, const char *prefix) |
| Removes an XML Namespace with the given prefix. | |
| LIBLAX_EXTERN int | XMLNode_setAttributes (XMLNode_t *node, const XMLAttributes_t *attributes) |
| Sets an XMLAttributes to this XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_setEnd (XMLNode_t *node) |
| Declares this XML start element is also an end element. | |
| LIBLAX_EXTERN int | XMLNode_setEOF (XMLNode_t *node) |
| Declares this XMLNode_t structure is an end-of-file (input) marker. | |
| LIBLAX_EXTERN int | XMLNode_setNamespaces (XMLNode_t *node, const XMLNamespaces_t *namespaces) |
| Sets an XMLnamespaces to this XML element. | |
| LIBLAX_EXTERN int | XMLNode_setTriple (XMLNode_t *node, const XMLTriple_t *triple) |
| Sets the XMLTripe (name, uri and prefix) of this XML element. | |
| LIBLAX_EXTERN char * | XMLNode_toXMLString (const XMLNode_t *node) |
| Returns a string which is converted from a given XMLNode. | |
| LIBLAX_EXTERN int | XMLNode_unsetEnd (XMLNode_t *node) |
| static const string trim | ( | const string & | s | ) | [static] |
| 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.
(namespace URI and prefix are empty) Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to which an attribute to be added. |
| name | a string, the local name of the attribute. |
| value | a string, the value of the attribute. |
| 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 optionally Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to which an attribute to be added. |
| name | a string, the local name of the attribute. |
| value | a string, the value of the attribute. |
| namespaceURI | a string, the namespace URI of the attribute. |
| prefix | a string, the prefix of the namespace |
| LIBLAX_EXTERN int XMLNode_addAttrWithTriple | ( | XMLNode_t * | node, |
| const XMLTriple_t * | triple, | ||
| const char * | value | ||
| ) |
Adds an attribute with the given XMLTriple/value pair to the attribute set in this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to which an attribute to be added. |
| triple | an XMLTriple, the XML triple of the attribute. |
| value | a string, the value of the attribute. |
| LIBLAX_EXTERN int XMLNode_addChild | ( | XMLNode_t * | node, |
| const XMLNode_t * | child | ||
| ) |
Adds a copy of child node to this XMLNode_t structure.
| node | XMLNode_t structure to which child is to be added. |
| child | XMLNode_t structure to be added as child. |
| 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.
If there is an XML namespace with the given prefix in this XMLNode, then the existing XML namespace will be overwritten by the new one. Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to be queried. |
| uri | a string, the uri for the namespace |
| prefix | a string, the prefix for the namespace |
| LIBLAX_EXTERN int XMLNode_clearAttributes | ( | XMLNode_t * | node | ) |
Clears (deletes) all attributes in this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure from which attributes to be cleared. |
| LIBLAX_EXTERN int XMLNode_clearNamespaces | ( | XMLNode_t * | node | ) |
Clears (deletes) all XML namespace declarations in the XMLNamespaces of this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN XMLNode_t* XMLNode_clone | ( | const XMLNode_t * | n | ) |
Creates a deep copy of the given XMLNode_t structure.
| n | the XMLNode_t structure to be copied |
| 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 (the second argument) must be given if the corresponding xmlns attribute is not included in the string of the first argument.
| xml | string to be converted to a XML node. |
| xmlns | XMLNamespaces_t structure the namespaces to set. |
| LIBLAX_EXTERN const char* XMLNode_convertXMLNodeToString | ( | const XMLNode_t * | node | ) |
| LIBLAX_EXTERN XMLNode_t* XMLNode_create | ( | void | ) |
Creates a new empty XMLNode_t structure with no children and returns a pointer to it.
| 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.
| triple | XMLTriple_t structure to be set. |
| 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.
| token | XMLToken_t structure to be copied to XMLNode_t structure. |
| 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.
| triple | XMLTriple_t structure to be set. |
| attr | XMLAttributes_t structure to be set. |
| 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.
| triple | XMLTriple_t structure to be set. |
| attr | XMLAttributes_t structure to be set. |
| ns | XMLNamespaces_t structure to be set. |
| LIBLAX_EXTERN XMLNode_t* XMLNode_createTextNode | ( | const char * | text | ) |
| LIBLAX_EXTERN int XMLNode_equals | ( | const XMLNode_t * | node, |
| const XMLNode_t * | other | ||
| ) |
| LIBLAX_EXTERN void XMLNode_free | ( | XMLNode_t * | node | ) |
Destroys this XMLNode_t structure.
| node | XMLNode_t structure to be freed. |
| LIBLAX_EXTERN const XMLAttributes_t* XMLNode_getAttributes | ( | const XMLNode_t * | node | ) |
Returns the attributes of this element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN int XMLNode_getAttributesLength | ( | const XMLNode_t * | node | ) |
Return the number of attributes in the attributes set.
| node | XMLNode_t structure to be queried. |
| 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.
| node | XMLNode_t structure to be queried. |
| name | a string, the local name of the attribute. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN int XMLNode_getAttrIndexByTriple | ( | const XMLNode_t * | node, |
| const XMLTriple_t * | triple | ||
| ) |
| 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 (by position).
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute whose local name is required. |
| LIBLAX_EXTERN char* XMLNode_getAttrPrefix | ( | const XMLNode_t * | node, |
| int | index | ||
| ) |
Return the prefix of an attribute in the attribute set in this XMLNode (by position).
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute whose prefix is required. |
| 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 (by position).
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute whose prefixed name is required. |
| 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 (by position).
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute whose namespace URI is required. |
| LIBLAX_EXTERN char* XMLNode_getAttrValue | ( | const XMLNode_t * | node, |
| int | index | ||
| ) |
Return the value of an attribute in the attribute set in this XMLNode (by position).
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute whose value is required. |
| 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).
| node | XMLNode_t structure to be queried. |
| name | a string, the local name of the attribute whose value is required. |
| 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.
| node | XMLNode_t structure to be queried. |
| name | a string, the local name of the attribute whose value is required. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN char* XMLNode_getAttrValueByTriple | ( | const XMLNode_t * | node, |
| const XMLTriple_t * | triple | ||
| ) |
Return a value of an attribute with the given XMLTriple.
| node | XMLNode_t structure to be queried. |
| triple | an XMLTriple, the XML triple of the attribute whose value is required. |
| LIBLAX_EXTERN const char* XMLNode_getCharacters | ( | const XMLNode_t * | node | ) |
Returns the text of this element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN const XMLNode_t* XMLNode_getChild | ( | const XMLNode_t * | node, |
| const int | n | ||
| ) |
Returns the nth child of this XMLNode_t structure.
| node | XMLNode_t structure to be queried. |
| n | the index of the node to return |
| 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.
| node | XMLNode_t structure to be queried. |
| name | the name of the node to return |
| 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.
| node | XMLNode_t structure to be queried. |
| name | the name of the node to return |
| LIBLAX_EXTERN XMLNode_t* XMLNode_getChildNC | ( | XMLNode_t * | node, |
| const unsigned int | n | ||
| ) |
Returns the (non-const) nth child of this XMLNode_t structure.
| node | XMLNode_t structure to be queried. |
| n | the index of the node to return |
| 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.
| node | XMLNode_t structure to be queried. |
| name | a string, the name of the child for which the index is required. |
| LIBLAX_EXTERN const char* XMLNode_getName | ( | const XMLNode_t * | node | ) |
Returns the (unqualified) name of this XML element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN int XMLNode_getNamespaceIndex | ( | const XMLNode_t * | node, |
| const char * | uri | ||
| ) |
Look up the index of an XML namespace declaration by URI.
| node | XMLNode_t structure to be queried. |
| uri | a string, uri of the required namespace. |
| LIBLAX_EXTERN int XMLNode_getNamespaceIndexByPrefix | ( | const XMLNode_t * | node, |
| const char * | prefix | ||
| ) |
Look up the index of an XML namespace declaration by prefix.
| node | XMLNode_t structure to be queried. |
| prefix | a string, prefix of the required namespace. |
| 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.
| node | XMLNode_t structure to be queried. |
| index | an integer, position of the removed namespace. |
| LIBLAX_EXTERN char* XMLNode_getNamespacePrefixByURI | ( | const XMLNode_t * | node, |
| const char * | uri | ||
| ) |
Look up the prefix of an XML namespace declaration by its URI.
| node | XMLNode_t structure to be queried. |
| uri | a string, uri of the required namespace. |
| LIBLAX_EXTERN const XMLNamespaces_t* XMLNode_getNamespaces | ( | const XMLNode_t * | node | ) |
Returns the XML namespace declarations for this XML element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN int XMLNode_getNamespacesLength | ( | const XMLNode_t * | node | ) |
Returns the number of XML namespaces stored in the XMLNamespaces of this XMLNode.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN char* XMLNode_getNamespaceURI | ( | const XMLNode_t * | node, |
| int | index | ||
| ) |
Look up the URI of an XML namespace declaration by its position.
| node | XMLNode_t structure to be queried. |
| index | an integer, position of the removed namespace. |
| LIBLAX_EXTERN char* XMLNode_getNamespaceURIByPrefix | ( | const XMLNode_t * | node, |
| const char * | prefix | ||
| ) |
Look up the URI of an XML namespace declaration by its prefix.
| node | XMLNode_t structure to be queried. |
| prefix | a string, prefix of the required namespace. |
| LIBLAX_EXTERN unsigned int XMLNode_getNumChildren | ( | const XMLNode_t * | node | ) |
Returns the number of children for this XMLNode_t structure.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN const char* XMLNode_getPrefix | ( | const XMLNode_t * | node | ) |
Returns the namespace prefix of this XML element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN const char* XMLNode_getURI | ( | const XMLNode_t * | node | ) |
Returns the namespace URI of this XML element.
| node | XMLNode_t structure to be queried. |
| LIBLAX_EXTERN int XMLNode_hasAttr | ( | const XMLNode_t * | node, |
| int | index | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given index exists in the attribute set in this XMLNode.
| node | XMLNode_t structure to be queried. |
| index | an integer, the position of the attribute. |
non-zero (true) if an attribute with the given index exists in the attribute set in this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasAttrWithName | ( | const XMLNode_t * | node, |
| const char * | name | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode.
| node | XMLNode_t structure to be queried. |
| name | a string, the local name of the attribute. |
non-zero (true) if an attribute with the given local name (without namespace URI) exists in the attribute set in this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasAttrWithNS | ( | const XMLNode_t * | node, |
| const char * | name, | ||
| const char * | uri | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode.
| node | XMLNode_t structure to be queried. |
| name | a string, the local name of the attribute. |
| uri | a string, the namespace URI of the attribute. |
non-zero (true) if an attribute with the given local name and namespace URI exists in the attribute set in this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasAttrWithTriple | ( | const XMLNode_t * | node, |
| const XMLTriple_t * | triple | ||
| ) |
Predicate returning true or false depending on whether an attribute with the given XML triple exists in the attribute set in this XMLNode.
| node | XMLNode_t structure to be queried. |
| triple | an XMLTriple, the XML triple of the attribute |
non-zero (true) if an attribute with the given XML triple exists in the attribute set in this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasChild | ( | const XMLNode_t * | node, |
| const char * | name | ||
| ) |
Return a boolean indicating whether node has a child with the given name.
| node | XMLNode_t structure to be queried. |
| name | a string, the name of the child to be checked. |
| LIBLAX_EXTERN int XMLNode_hasNamespaceNS | ( | const XMLNode_t * | node, |
| const char * | uri, | ||
| const char * | prefix | ||
| ) |
Predicate returning true or false depending on whether an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces of this XMLNode.
| node | XMLNode_t structure to be queried. |
| uri | a string, the uri for the namespace |
| prefix | a string, the prefix for the namespace |
non-zero (true) if an XML Namespace with the given uri/prefix pair is contained in the XMLNamespaces of this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasNamespacePrefix | ( | const XMLNode_t * | node, |
| const char * | prefix | ||
| ) |
Predicate returning true or false depending on whether an XML Namespace with the given prefix is contained in the XMLNamespaces of this XMLNode.
| node | XMLNode_t structure to be queried. |
| prefix | a string, the prefix for the namespace |
no-zero (true) if an XML Namespace with the given URI is contained in the XMLNamespaces of this XMLNode, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_hasNamespaceURI | ( | const XMLNode_t * | node, |
| const char * | uri | ||
| ) |
Predicate returning true or false depending on whether an XML Namespace with the given URI is contained in the XMLNamespaces of this XMLNode.
| node | XMLNode_t structure to be queried. |
| uri | a string, the uri for the namespace |
no-zero (true) if an XML Namespace with the given URI is contained in the XMLNamespaces of this XMLNode, zero (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.
| node | XMLNode_t structure to which child is to be added. n the index at which the given node is inserted |
| child | XMLNode_t structure to be inserted as nth child. |
| LIBLAX_EXTERN int XMLNode_isAttributesEmpty | ( | const XMLNode_t * | node | ) |
| LIBLAX_EXTERN int XMLNode_isElement | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML element.
| node | XMLNode_t structure to be queried. |
non-zero (true) if this XMLNode_t structure is an XML element, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_isEnd | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML end element.
| node | XMLNode_t structure to be queried. |
non-zero (true) if this XMLNode_t structure is an XML end element, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_isEndFor | ( | const XMLNode_t * | node, |
| const XMLNode_t * | element | ||
| ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML end element for the given start element.
| node | XMLNode_t structure to be queried. |
| element | XMLNode_t structure, element for which query is made. |
non-zero (true) if this XMLNode_t structure is an XML end element for the given XMLNode_t structure start element, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_isEOF | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an end of file marker.
| node | XMLNode_t structure to be queried. |
non-zero (true) if this XMLNode_t structure is an end of file (input) marker, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_isNamespacesEmpty | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether the XMLNamespaces of this XMLNode is empty.
| node | XMLNode_t structure to be queried. |
non-zero (true) if the XMLNamespaces of this XMLNode is empty, zero (false) otherwise. | LIBLAX_EXTERN int XMLNode_isStart | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML start element.
| node | XMLNode_t structure to be queried. |
true if this XMLNode_t structure is an XML start element, false otherwise. | LIBLAX_EXTERN int XMLNode_isText | ( | const XMLNode_t * | node | ) |
Predicate returning true or false depending on whether this XMLNode_t structure is an XML text element.
| node | XMLNode_t structure to be queried. |
non-zero (true) if this XMLNode_t structure is an XML text element, zero (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.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure from which an attribute to be removed. |
| n | an integer the index of the resource to be deleted |
| 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.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure from which an attribute to be removed. |
| name | a string, the local name of the attribute. |
| uri | a string, the namespace URI of the attribute. |
| 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.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure from which an attribute to be removed. |
| name | a string, the local name of the attribute. |
| uri | a string, the namespace URI of the attribute. |
| LIBLAX_EXTERN int XMLNode_removeAttrByTriple | ( | XMLNode_t * | node, |
| const XMLTriple_t * | triple | ||
| ) |
Removes an attribute with the given XMLTriple from the attribute set in this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure from which an attribute to be removed. |
| triple | an XMLTriple, the XML triple of the attribute. |
| LIBLAX_EXTERN XMLNode_t* XMLNode_removeChild | ( | XMLNode_t * | node, |
| unsigned int | n | ||
| ) |
Removes the nth child of this XMLNode and returned the removed node.
| node | XMLNode_t structure to which child is to be removed. |
| n | the index of the node to be removed |
| LIBLAX_EXTERN int XMLNode_removeChildren | ( | XMLNode_t * | node | ) |
Removes all children from this node.
| n | an integer the index of the resource to be deleted |
| LIBLAX_EXTERN int XMLNode_removeNamespace | ( | XMLNode_t * | node, |
| int | index | ||
| ) |
Removes an XML Namespace stored in the given position of the XMLNamespaces of this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to be queried. |
| index | an integer, position of the removed namespace. |
| 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 is not a start element.
| node | XMLNode_t structure to be queried. |
| prefix | a string, prefix of the required namespace. |
| LIBLAX_EXTERN int XMLNode_setAttributes | ( | XMLNode_t * | node, |
| const XMLAttributes_t * | attributes | ||
| ) |
Sets an XMLAttributes to this XMLNode.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to which attributes to be set. |
| attributes | XMLAttributes to be set to this XMLNode. |
| LIBLAX_EXTERN int XMLNode_setEnd | ( | XMLNode_t * | node | ) |
Declares this XML start element is also an end element.
| node | XMLNode_t structure to be set. |
| LIBLAX_EXTERN int XMLNode_setEOF | ( | XMLNode_t * | node | ) |
Declares this XMLNode_t structure is an end-of-file (input) marker.
| node | XMLNode_t structure to be set. |
| LIBLAX_EXTERN int XMLNode_setNamespaces | ( | XMLNode_t * | node, |
| const XMLNamespaces_t * | namespaces | ||
| ) |
Sets an XMLnamespaces to this XML element.
Nothing will be done if this XMLNode is not a start element.
| node | XMLNode_t structure to be queried. |
| namespaces | XMLNamespaces to be set to this XMLNode. |
| LIBLAX_EXTERN int XMLNode_setTriple | ( | XMLNode_t * | node, |
| const XMLTriple_t * | triple | ||
| ) |
Sets the XMLTripe (name, uri and prefix) of this XML element.
Nothing will be done if this XML element is a text node.
| node | XMLNode_t structure to which the triple to be added. |
| triple | an XMLTriple, the XML triple to be set to this XML element. |
| LIBLAX_EXTERN char* XMLNode_toXMLString | ( | const XMLNode_t * | node | ) |
| LIBLAX_EXTERN int XMLNode_unsetEnd | ( | XMLNode_t * | node | ) |