UPnPsdk 0.1
Universal Plug and Play +, Software Development Kit
 
Loading...
Searching...
No Matches
element.cpp File Reference
#include <ixml/ixmlparser.hpp>
#include <cassert>
#include <cstring>
+ Include dependency graph for element.cpp:

Go to the source code of this file.

Functions

void ixmlElement_init (IXML_Element *element)
 Initializes a IXML_Element node.
 
const DOMString ixmlElement_getTagName (IXML_Element *element)
 Returns the name of the tag as a constant string.
 
int ixmlElement_setTagName (IXML_Element *element, const char *tagName)
 Set the given element's tagName.
 
const DOMString ixmlElement_getAttribute (IXML_Element *element, const DOMString name)
 Retrieves an attribute of an Element by name.
 
int ixmlElement_setAttribute (IXML_Element *element, const DOMString name, const DOMString value)
 Adds a new attribute to an Element.
 
int ixmlElement_removeAttribute (IXML_Element *element, const DOMString name)
 Removes an attribute value by name. The attribute node is not removed.
 
IXML_AttrixmlElement_getAttributeNode (IXML_Element *element, const DOMString name)
 Retrieves an attribute node by name. See ixmlElement_getAttributeNodeNS to retrieve an attribute node using a qualified name or namespace URI.
 
int ixmlElement_setAttributeNode (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
 Adds a new attribute node to an Element.
 
static IXML_NodeixmlElement_findAttributeNode (IXML_Element *element, IXML_Attr *oldAttr)
 Find a attribute node whose contents are the same as the oldAttr.
 
int ixmlElement_removeAttributeNode (IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
 Removes the specified attribute node from an Element.
 
IXML_NodeListixmlElement_getElementsByTagName (IXML_Element *element, const DOMString tagName)
 Returns a NodeList of all descendant Elements with a given tag name, in the order in which they are encountered in a pre-order traversal of this Element tree.
 
const DOMString ixmlElement_getAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
 Retrieves an attribute value using the local name and namespace URI.
 
int ixmlElement_setAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString qualifiedName, const DOMString value)
 Adds a new attribute to an Element using the local name and namespace URI.
 
int ixmlElement_removeAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
 Removes an attribute using the namespace URI and local name.
 
IXML_AttrixmlElement_getAttributeNodeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
 Retrieves an Attr node by local name and namespace URI.
 
int ixmlElement_setAttributeNodeNS (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
 Adds a new attribute node to the element node specified.
 
IXML_NodeListixmlElement_getElementsByTagNameNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
 Returns a NodeList of all descendant Elements with a given local name and namespace in the order in which they are encountered in the pre-order traversal of the Element tree.
 
int ixmlElement_hasAttribute (IXML_Element *element, const DOMString name)
 Queries whether the Element has an attribute with the given name or a default value.
 
int ixmlElement_hasAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
 Queries whether the Element has an attribute with the given local name and namespace URI or has a default value for that attribute.
 
void ixmlElement_free (IXML_Element *element)
 Frees the given Element and any subtree of the Element.
 

Function Documentation

◆ ixmlElement_setTagName()

int ixmlElement_setTagName ( IXML_Element element,
const char *  tagName 
)

Set the given element's tagName.

Returns
One of the following:
  • IXML_SUCCESS, if successfull.
  • IXML_FAILED, if element of tagname is NULL.
  • IXML_INSUFFICIENT_MEMORY, if there is no memory to allocate the buffer for the element's tagname.
Parameters
[in]elementThe element to change the tagname.
[in]tagNameThe new tagName for the element.

Definition at line 57 of file element.cpp.

+ Here is the caller graph for this function:

◆ ixmlElement_findAttributeNode()

static IXML_Node * ixmlElement_findAttributeNode ( IXML_Element element,
IXML_Attr oldAttr 
)
static

Find a attribute node whose contents are the same as the oldAttr.

Returns
If found, the attribute node is returned, otherwise NULL is returned.
Parameters
[in]elementThe element to search for the attribute.
[in]oldAttrThe attribute node to match.

Definition at line 276 of file element.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: