- Main Page
- Modules
- Classes
- Files
- Directories
- Related Pages
- Examples

- Search for |

# element
[AXIOM]

## Functions
AXIS2_EXTERN axiom_element_t * | axiom_element_create (const axutil_env_t *env, axiom_node_t *parent, const axis2_char_t *localname, axiom_namespace_t *ns, axiom_node_t **node)
AXIS2_EXTERN axiom_element_t * | axiom_element_create_with_qname (const axutil_env_t *env, axiom_node_t *parent, const axutil_qname_t *qname, axiom_node_t **node)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_find_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *node, const axis2_char_t *uri, const axis2_char_t *prefix)
AXIS2_EXTERN axis2_status_t | axiom_element_declare_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *node, axiom_namespace_t *ns)
AXIS2_EXTERN axis2_status_t | axiom_element_declare_namespace_assume_param_ownership (axiom_element_t *om_element, const axutil_env_t *env, axiom_namespace_t *ns)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_find_namespace_with_qname (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *node, axutil_qname_t *qname)
AXIS2_EXTERN axis2_status_t | axiom_element_add_attribute (axiom_element_t *om_element, const axutil_env_t *env, axiom_attribute_t *attribute, axiom_node_t *node)
AXIS2_EXTERN axiom_attribute_t * | axiom_element_get_attribute (axiom_element_t *om_element, const axutil_env_t *env, axutil_qname_t *qname)
AXIS2_EXTERN axis2_char_t * | axiom_element_get_attribute_value (axiom_element_t *om_element, const axutil_env_t *env, axutil_qname_t *qname)
AXIS2_EXTERN void | axiom_element_free (axiom_element_t *element, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_element_serialize_start_part (axiom_element_t *om_element, const axutil_env_t *env, axiom_output_t *om_output, axiom_node_t *ele_node)
AXIS2_EXTERN axis2_status_t | axiom_element_serialize_end_part (axiom_element_t *om_element, const axutil_env_t *env, axiom_output_t *om_output)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_find_declared_namespace (axiom_element_t *om_element, const axutil_env_t *env, const axis2_char_t *uri, const axis2_char_t *prefix)
AXIS2_EXTERN axis2_char_t * | axiom_element_get_localname (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_element_set_localname (axiom_element_t *om_element, const axutil_env_t *env, const axis2_char_t *localname)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_get_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *ele_node)
AXIS2_EXTERN axis2_status_t | axiom_element_set_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_namespace_t *ns, axiom_node_t *node)
AXIS2_EXTERN axis2_status_t | axiom_element_set_namespace_assume_param_ownership (axiom_element_t *om_element, const axutil_env_t *env, axiom_namespace_t *ns)
AXIS2_EXTERN axutil_hash_t * | axiom_element_get_all_attributes (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN axutil_hash_t * | axiom_element_get_namespaces (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN axutil_qname_t * | axiom_element_get_qname (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *ele_node)
AXIS2_EXTERN axiom_children_iterator_t * | axiom_element_get_children (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axiom_children_qname_iterator_t * | axiom_element_get_children_with_qname (axiom_element_t *om_element, const axutil_env_t *env, axutil_qname_t *element_qname, axiom_node_t *element_node)
AXIS2_EXTERN axiom_element_t * | axiom_element_get_first_child_with_qname (axiom_element_t *om_element, const axutil_env_t *env, axutil_qname_t *element_qname, axiom_node_t *element_node, axiom_node_t **child_node)
AXIS2_EXTERN axis2_status_t | axiom_element_remove_attribute (axiom_element_t *om_element, const axutil_env_t *env, axiom_attribute_t *om_attribute)
AXIS2_EXTERN axis2_status_t | axiom_element_set_text (axiom_element_t *om_element, const axutil_env_t *env, const axis2_char_t *text, axiom_node_t *element_node)
AXIS2_EXTERN axis2_char_t * | axiom_element_get_text (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axiom_element_t * | axiom_element_get_first_element (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node, axiom_node_t **first_element_node)
AXIS2_EXTERN axis2_char_t * | axiom_element_to_string (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axiom_child_element_iterator_t * | axiom_element_get_child_elements (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axis2_status_t | axiom_element_build (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_get_default_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *element_node)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_declare_default_namespace (axiom_element_t *om_element, const axutil_env_t *env, axis2_char_t *uri)
AXIS2_EXTERN axiom_namespace_t * | axiom_element_find_namespace_uri (axiom_element_t *om_element, const axutil_env_t *env, const axis2_char_t *prefix, axiom_node_t *element_node)
AXIS2_EXTERN axis2_status_t | axiom_element_set_namespace_with_no_find_in_current_scope (axiom_element_t *om_element, const axutil_env_t *env, axiom_namespace_t *om_ns)
AXIS2_EXTERN axutil_hash_t * | axiom_element_extract_attributes (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *ele_node)
AXIS2_EXTERN axis2_char_t * | axiom_element_get_attribute_value_by_name (axiom_element_t *om_ele, const axutil_env_t *env, axis2_char_t *attr_name)
AXIS2_EXTERN axiom_element_t * | axiom_element_create_str (const axutil_env_t *env, axiom_node_t *parent, axutil_string_t *localname, axiom_namespace_t *ns, axiom_node_t **node)
AXIS2_EXTERN axutil_string_t * | axiom_element_get_localname_str (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_element_set_localname_str (axiom_element_t *om_element, const axutil_env_t *env, axutil_string_t *localname)
AXIS2_EXTERN axis2_bool_t | axiom_element_get_is_empty (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN void | axiom_element_set_is_empty (axiom_element_t *om_element, const axutil_env_t *env, axis2_bool_t is_empty)
AXIS2_EXTERN axutil_hash_t * | axiom_element_gather_parent_namespaces (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *om_node)
AXIS2_EXTERN void | axiom_element_use_parent_namespace (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *om_node, axiom_namespace_t *ns, axiom_element_t *root_element, axutil_hash_t *inscope_namespaces)
AXIS2_EXTERN void | axiom_element_redeclare_parent_namespaces (axiom_element_t *om_element, const axutil_env_t *env, axiom_node_t *om_node, axiom_element_t *root_element, axutil_hash_t *inscope_namespaces)

## Function Documentation

AXIS2_EXTERN axis2_status_t axiom_element_add_attribute | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_attribute_t * | attribute,
|  | axiom_node_t * | node |
| ) |  |  |

Adds an attribute to current element The current element takes responsibility of the assigned attribute

Parameters:

  | om_element | element to which the attribute is to be added.cannot be NULL.
  | env | Environment. MUST NOT be NULL.
  | attribute | attribute to be added.
  | node | axiom_node_t node that om_element is contained in

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.

AXIS2_EXTERN axis2_status_t axiom_element_build | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

builds this om_element_node completely, This is only possible if the om_stax_builder is associated with the om_element_node,

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node
  | element_node | corresponding om element node of this om element struct

Returns:
  AXIS2_SUCCESS if this element node was successfully completed, otherwise returns AXIS2_FAILURE

AXIS2_EXTERN axiom_element_t* axiom_element_create | ( | const axutil_env_t * | env,
|  | axiom_node_t * | parent,
|  | const axis2_char_t * | localname,
|  | axiom_namespace_t * | ns,
|  | axiom_node_t ** | node |
| ) |  |  |

Creates an AXIOM element with given local name

Parameters:

  | env | Environment. MUST NOT be NULL.
  | parent | parent of the element node to be created. can be NULL.
  | localname | local name of the elment. cannot be NULL.
  | ns | namespace of the element. can be NULL. If the value of the namespace has not already been declared then the namespace structure ns will be declared and will be freed when the tree is freed. If the value of the namespace has already been declared using another namespace structure then the namespace structure ns will be freed.
  | node | This is an out parameter. cannot be NULL. Returns the node corresponding to the comment created. Node type will be set to AXIOM_ELEMENT

Returns:
  a pointer to the newly created element struct

AXIS2_EXTERN axiom_element_t* axiom_element_create_str | ( | const axutil_env_t * | env,
|  | axiom_node_t * | parent,
|  | axutil_string_t * | localname,
|  | axiom_namespace_t * | ns,
|  | axiom_node_t ** | node |
| ) |  |  |

Create an OM Element and an OM node from given string params

Parameters:

  | env | environment MUST not be NULL
  | parent | pointer to this parent element node
  | localname | the locanmae of the element
  | ns | the namespace of the element
  | node | the reference ot the created node

Returns:

AXIS2_EXTERN axiom_element_t* axiom_element_create_with_qname | ( | const axutil_env_t * | env,
|  | axiom_node_t * | parent,
|  | const axutil_qname_t * | qname,
|  | axiom_node_t ** | node |
| ) |  |  |

Creates an AXIOM element with given qname

Parameters:

  | env | Environment. MUST NOT be NULL.
  | parent | parent of the element node to be created. can be NULL.
  | qname | qname of the elment.cannot be NULL.
  | node | This is an out parameter. cannot be NULL. Returns the node corresponding to the comment created. Node type will be set to AXIOM_ELEMENT

Returns:
  a pointer to the newly created element struct

AXIS2_EXTERN axiom_namespace_t* axiom_element_declare_default_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | uri |
| ) |  |  |

declared a default namespace explicitly

Parameters:

  | om_element | pointer to om element
  | env | environment MUST not be NULL
  | uri | namespace uri of the default namespace

Returns:
  the declared namespace

AXIS2_EXTERN axis2_status_t axiom_element_declare_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | node,
|  | axiom_namespace_t * | ns |
| ) |  |  |

Declare a namespace in current element (in the scope of this element ). It checks to see if it is already declared.

Parameters:

  | om_element | contained in the om node struct
  | env | Environment. MUST NOT be NULL.
  | node | node containing an instance of an AXIOM element.
  | ns | pointer to the namespace struct to be declared

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.

AXIS2_EXTERN axis2_status_t axiom_element_declare_namespace_assume_param_ownership | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_namespace_t * | ns |
| ) |  |  |

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE.

AXIS2_EXTERN axutil_hash_t* axiom_element_extract_attributes | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | ele_node |
| ) |  |  |

Extract attributes , returns a clones hash table of attributes, if attributes are associated with a namespace it is also cloned

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node

AXIS2_EXTERN axiom_namespace_t* axiom_element_find_declared_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | uri,
|  | const axis2_char_t * | prefix |
| ) |  |  |

finds a namespace in current element's scope, by uri or prefix or both

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | uri | namespace uri, may be null
  | prefix | prefix

Returns:
  axiom_namespace_t if found, else return NULL

AXIS2_EXTERN axiom_namespace_t* axiom_element_find_namespace_uri | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | prefix,
|  | axiom_node_t * | element_node |
| ) |  |  |

checks for the namespace in the context of this element with the given prefix

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_element_node | pointer to this element node

Returns:
  pointer to relevent namespace

AXIS2_EXTERN axiom_namespace_t* axiom_element_find_namespace_with_qname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | node,
|  | axutil_qname_t * | qname |
| ) |  |  |

Finds a namespace using qname Start to find from the given node and go up the hierarchy.

Parameters:

  | om_element | om_element contained in node
  | env | Environment. MUST NOT be NULL.
  | node | node containing an instance of an AXIOM element, cannot be NULL.
  | qname | qname of the namespace to be found. cannot be NULL.

Returns:
  pointer to the namespace, if found, else NULL. On error, returns NULL and sets the error code in environment's error struct.

AXIS2_EXTERN void axiom_element_free | ( | axiom_element_t * | element,
|  | const axutil_env_t * | env |
| ) |  |  |

Frees given element

Parameters:

  | element | AXIOM element to be freed.
  | env | Environment. MUST NOT be NULL.

Returns:
  satus of the op. AXIS2_SUCCESS on success ,AXIS2_FAILURE on error.

AXIS2_EXTERN axutil_hash_t* axiom_element_gather_parent_namespaces | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | om_node |
| ) |  |  |

Collect all the namespaces with distinct prefixes in the parents of the given element. Effectively this is the set of namespaces declared above this element that are inscope at this element and might be used by it or its children.

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node

Returns:
  pointer to hash of relevent namespaces

AXIS2_EXTERN axutil_hash_t* axiom_element_get_all_attributes | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env |
| ) |  |  |

get the attribute list of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL

Returns:
  axutil_hash poiner to attributes hash This hash table is read only

AXIS2_EXTERN axiom_attribute_t* axiom_element_get_attribute | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axutil_qname_t * | qname |
| ) |  |  |

Gets (finds) the attribute with the given qname

Parameters:

  | element | element whose attribute is to be found.
  | env | Environment. MUST NOT be NULL. qname qname of the attribute to be found. should not be NULL.

Returns:
  a pointer to the attribute with given qname if found, else NULL. On error, returns NULL and sets the error code in environment's error struct.

AXIS2_EXTERN axis2_char_t* axiom_element_get_attribute_value | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axutil_qname_t * | qname |
| ) |  |  |

Gets (finds) the attribute value with the given qname

Parameters:

  | element | element whose attribute is to be found.
  | env | Environment. MUST NOT be NULL. qname qname of the attribute to be found. should not be NULL.

Returns:
  the attribute value with given qname if found, else NULL. On error, returns NULL and sets the error code in environment's error struct.

AXIS2_EXTERN axis2_char_t* axiom_element_get_attribute_value_by_name | ( | axiom_element_t * | om_ele,
|  | const axutil_env_t * | env,
|  | axis2_char_t * | attr_name |
| ) |  |  |

Returns the attribute value as a string for the given element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | attr_name | the attribute name

Returns:
  the attribute value as a string

AXIS2_EXTERN axiom_child_element_iterator_t* axiom_element_get_child_elements | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

returns an iterator with child elements of type AXIOM_ELEMENT iterator is freed when om_element node is freed

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element_node |

Returns:
  axiom_child_element_iterator_t , NULL on error

AXIS2_EXTERN axiom_children_iterator_t* axiom_element_get_children | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

returns a list of children iterator returned iterator is freed when om_element struct is freed iterators reset function must be called by user

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element_node | pointer to this element node

AXIS2_EXTERN axiom_children_qname_iterator_t* axiom_element_get_children_with_qname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axutil_qname_t * | element_qname,
|  | axiom_node_t * | element_node |
| ) |  |  |

returns a list of children iterator with qname returned iterator is freed when om element struct is freed

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element_node | pointer to this element node

Returns:
  children qname iterator struct

AXIS2_EXTERN axiom_namespace_t* axiom_element_get_default_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

retrieves the default namespace of this element , if available,

Parameters:

  | om_element | pointer to om element
  | env | axutil_environment MUST Not be NULL
  | element_node | corresponding om element node of this om element

Returns:
  pointer to default namespace if availale , NULL otherwise

AXIS2_EXTERN axiom_element_t* axiom_element_get_first_child_with_qname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axutil_qname_t * | element_qname,
|  | axiom_node_t * | element_node,
|  | axiom_node_t ** | child_node |
| ) |  |  |

Returns the om_element corresponding to element_qname

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element_qname | qname of the element
  | om_node | pointer to this element node
  | element_node |
  | child_node |

Returns:
  children qname iterator struct

AXIS2_EXTERN axiom_element_t* axiom_element_get_first_element | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node,
|  | axiom_node_t ** | first_element_node |
| ) |  |  |

returns the first child om element of this om element node

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node

Returns:
  om_element if one is availble otherwise return NULL

AXIS2_EXTERN axis2_bool_t axiom_element_get_is_empty | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env |
| ) |  |  |

Return whether the element is empty or not

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL

Returns:
  AXIS2_TRUE if empty AXIS2_FALSE if not empty

AXIS2_EXTERN axis2_char_t* axiom_element_get_localname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env |
| ) |  |  |

returns the localname of this element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL

Returns:
  localname of element, returns NULL on error.

AXIS2_EXTERN axutil_string_t* axiom_element_get_localname_str | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env |
| ) |  |  |

Returns the Local name of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node

Returns:
  the Local name of the element

AXIS2_EXTERN axiom_namespace_t* axiom_element_get_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | ele_node |
| ) |  |  |

get the namespace of om_element

Parameters:

  | om_element | om_element struct
  | env | environemt, MUST NOT be NULL.

Returns:
  pointer to axiom_namespace_t struct NULL if there is no namespace associated with the element, NULL on error with error code set to environment's error

AXIS2_EXTERN axutil_hash_t* axiom_element_get_namespaces | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env |
| ) |  |  |

get the namespace list of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL

Returns:
  axutil_hash pointer to namespaces hash this hash table is read only

AXIS2_EXTERN axutil_qname_t* axiom_element_get_qname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | ele_node |
| ) |  |  |

Returns:
  qname of this element the returned qname should not be externaly freed when om_element struct is freed qname is also freed

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | ele_node | pointer to this element node

Returns:
  axutil_qname_t struct , NULL on failure

AXIS2_EXTERN axis2_char_t* axiom_element_get_text | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

Select all the text children and concat them to a single string. The string returned by this method call will be free by axiom when this method is called again. So it is recomended to have a copy of the return value if this method is going to be called more that once and the return values of the earlier calls are important.

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element | node , the container node of this om element

Returns:
  the contanated text of all text childrens text values return null if no text children is avilable or on error

AXIS2_EXTERN void axiom_element_redeclare_parent_namespaces | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | om_node,
|  | axiom_element_t * | root_element,
|  | axutil_hash_t * | inscope_namespaces |
| ) |  |  |

Examines the subtree beginning at the provided element For each element or attribute, if it refers to a namespace declared in a parent of the subtree root element, redeclares that namespace at the level of the subtree root and removes it from the set of parent namespaces in scope and not yet declared

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node
  | root_element | pointer to the subtree root element node
  | inscope_namespaces | pointer to hash of parent namespaces

AXIS2_EXTERN axis2_status_t axiom_element_remove_attribute | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_attribute_t * | om_attribute |
| ) |  |  |

removes an attribute from the element attribute list user must free this attribute, element free function does not free attributes that are not is it's attribute list

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_attribute | attribute to be removed

Returns:
  AXIS2_SUCCESS if attribute was found and removed, else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axiom_element_serialize_end_part | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_output_t * | om_output |
| ) |  |  |

Serializes the end part of the given element. serialize_start_part must have been called before calling this method.

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node
  | om_output | AXIOM output handler to be used in serializing

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE

AXIS2_EXTERN axis2_status_t axiom_element_serialize_start_part | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_output_t * | om_output,
|  | axiom_node_t * | ele_node |
| ) |  |  |

Serializes the start part of the given element

Parameters:

  | element | element to be serialized.
  | env | Environment. MUST NOT be NULL.
  | om_output | AXIOM output handler to be used in serializing

Returns:
  satus of the op. AXIS2_SUCCESS on success else AXIS2_FAILURE

AXIS2_EXTERN void axiom_element_set_is_empty | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axis2_bool_t | is_empty |
| ) |  |  |

Set whether the element is empty or not

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | is_empty | AXIS2_TRUE if empty AXIS2_FALSE if not empty

Returns:
  VOID

AXIS2_EXTERN axis2_status_t axiom_element_set_localname | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | localname |
| ) |  |  |

set the localname of this element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL text value to be set as localname

Returns:
  status code of op, AXIS2_SUCCESS on success, AXIS2_FAILURE on error.

AXIS2_EXTERN axis2_status_t axiom_element_set_localname_str | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axutil_string_t * | localname |
| ) |  |  |

Set the Local name of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | localname | the Local name of the element

Returns:

AXIS2_EXTERN axis2_status_t axiom_element_set_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_namespace_t * | ns,
|  | axiom_node_t * | node |
| ) |  |  |

set the namespace of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | ns | pointer to namespace If the value of the namespace has not already been declared then the namespace structure ns will be declared and will be freed when the tree is freed.

Returns:
  status code of the op, with error code set to environment's error

AXIS2_EXTERN axis2_status_t axiom_element_set_namespace_assume_param_ownership | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_namespace_t * | ns |
| ) |  |  |

unconditionally set the namespace of the element

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | ns | pointer to namespace The namespace ns is assumed to have been declared already.

Returns:
  status code of the op, with error code set to environment's error

AXIS2_EXTERN axis2_status_t axiom_element_set_namespace_with_no_find_in_current_scope | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_namespace_t * | om_ns |
| ) |  |  |

This will not search the namespace in the scope nor will declare in the current element, as in set_namespace. This will just assign the given namespace to the element.

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node
  | om_ns | pointer to namespace to be set

Returns:

AXIS2_EXTERN axis2_status_t axiom_element_set_text | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | text,
|  | axiom_node_t * | element_node |
| ) |  |  |

Sets the text of the given element. caution - This method will wipe out all the text elements (and hence any mixed content) before setting the text

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | text | text to set.
  | element_node | node of element.

Returns:
  AXIS2_SUCCESS if attribute was found and removed, else AXIS2_FAILURE

AXIS2_EXTERN axis2_char_t* axiom_element_to_string | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | element_node |
| ) |  |  |

returns the serilized text of this element and its children

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | element_node | the container node this on element is contained

Returns:
  a char array of xml , returns NULL on error

AXIS2_EXTERN void axiom_element_use_parent_namespace | ( | axiom_element_t * | om_element,
|  | const axutil_env_t * | env,
|  | axiom_node_t * | om_node,
|  | axiom_namespace_t * | ns,
|  | axiom_element_t * | root_element,
|  | axutil_hash_t * | inscope_namespaces |
| ) |  |  |

If the provided namespace used by the provided element is one of the namespaces from the parent of the root root element, redeclares that namespace at the root element and removes it from the hash of parent namespaces

Parameters:

  | om_element | pointer to om_element
  | env | environment MUST not be NULL
  | om_node | pointer to this element node
  | ns | pointer to namespace to redeclare
  | root_element | pointer to the subtree root element node
  | inscope_namespaces | pointer to hash of parent namespaces