libUPnP 1.18.5
element.c File Reference
#include "ixml.h"
#include "ixmlparser.h"
#include <stdlib.h>
#include <string.h>
#include "posix_overwrites.h"
Include dependency graph for element.c:

Data Structures

struct  s_extra_parameters

Typedefs

typedef struct s_extra_parameters Extra_Parameters_t
typedef int(* Find_Condition_t) (const IXML_Node *n, const Extra_Parameters_t *p)

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.
static int find_condition_name (const IXML_Node *n, const Extra_Parameters_t *p)
static IXML_Nodeget_attribute_node (Find_Condition_t condition, IXML_Element *element, Extra_Parameters_t *p)
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_AttrixmlElement_getAttributeNode (IXML_Element *element, const DOMString name)
static int ixmlElement_setAttributeNode_common (Find_Condition_t find_condition, IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
static int find_condition_node_name (const IXML_Node *n1, const Extra_Parameters_t *p)
int ixmlElement_setAttributeNode (IXML_Element *element, IXML_Attr *newAttr, IXML_Attr **rtAttr)
 Adds a new attribute node to an Element.
static int find_condition_node (const IXML_Node *n1, const Extra_Parameters_t *p)
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)
static int find_condition_ns_ln (const IXML_Node *n, const Extra_Parameters_t *p)
const DOMString ixmlElement_getAttributeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
static int check_namespace_error (IXML_Node *n, const DOMString namespaceURI, const DOMString qualifiedName)
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_AttrixmlElement_getAttributeNodeNS (IXML_Element *element, const DOMString namespaceURI, const DOMString localName)
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)
int ixmlElement_hasAttribute (IXML_Element *element, const DOMString name)
int 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.

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.

Referenced by ixmlNode_cloneElement().