element.c File Reference
`#include "ixmlparser.h"`
`#include <assert.h>`
`#include <stdlib.h>`
`#include <string.h>`
Include dependency graph for element.c:

## Functions

void | ixmlElement_init (IXML_Element *element)
| Initializes a IXML_Element node. More...
const DOMString | ixmlElement_getTagName (IXML_Element *element)
| Returns the name of the tag as a constant string. More...
int | ixmlElement_setTagName (IXML_Element *element, const char *tagName)
| Set the given element's tagName. More...
const DOMString | ixmlElement_getAttribute (IXML_Element *element, const DOMString name)
int | ixmlElement_setAttribute (IXML_Element *element, const DOMString name, const DOMString value)
int | ixmlElement_removeAttribute (IXML_Element *element, const DOMString name)
IXML_Attr * | ixmlElement_getAttributeNode (IXML_Element *element, const DOMString name)
int | ixmlElement_setAttributeNode (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
| Adds a new attribute node to an Element. More...
static IXML_Node * | ixmlElement_findAttributeNode (IXML_Element *element, IXML_Attr *oldAttr)
| Find a attribute node whose contents are the same as the oldAttr. More...
int | ixmlElement_removeAttributeNode (IXML_Element *element, IXML_Attr *oldAttr, IXML_Attr **rtAttr)
| Removes the specified attribute node from an Element. More...
IXML_NodeList * | ixmlElement_getElementsByTagName (IXML_Element *element, const DOMString tagName)
const DOMString | ixmlElement_getAttributeNS (IN IXML_Element *element, IN const DOMString namespaceURI, IN const DOMString localName)
int | ixmlElement_setAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString qualifiedName, const DOMString value)
int | ixmlElement_removeAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
IXML_Attr * | ixmlElement_getAttributeNodeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
int | ixmlElement_setAttributeNodeNS (IN IXML_Element *element, IN IXML_Attr *newAttr, OUT IXML_Attr **rtAttr)
IXML_NodeList * | ixmlElement_getElementsByTagNameNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
BOOL | ixmlElement_hasAttribute (IXML_Element *element, const DOMString name)
BOOL | ixmlElement_hasAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
void | ixmlElement_free (IXML_Element *element)
| Frees the given Element and any subtree of the Element. More...

## Function Documentation

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] | element | The element to search for the attribute.
  [in] | oldAttr | The attribute node to match.

References ixmlNode_compare().

Referenced by ixmlElement_removeAttributeNode().

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] | element | The element to change the tagname.
  [in] | tagName | The new tagName for the element.

Referenced by ixmlNode_cloneElement().