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_taxiom_element_get_all_attributes (axiom_element_t *om_element, const axutil_env_t *env)
AXIS2_EXTERN axutil_hash_taxiom_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, 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_taxiom_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)

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

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 om_element struct
env environment
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.
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_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 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

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 elements scope

Parameters:
om_element 
env environemt must not be null
uri namespace uri
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,
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_get_all_attributes axiom_element_t *  om_element,
const axutil_env_t env
 

get the attribute list of the element

Parameters:
om_element 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 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 
element_node 
env enviroment must not be null
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 iterators free function must be called by user

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 
env 
element_qname 
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
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

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:
element_node the container node of this om_element
Returns:
om_element if one is availble otherwise return NULL

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 om_element struct
env environment struct
Returns:
localname of element, returns NULL on error.

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 om element
env environment
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

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

Parameters:
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 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 
env 
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 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 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 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 om_element_struct to with localname is set
env environment struct 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_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 Om_element struct
env environment must not be null
ns pointer to namespace
Returns:
status code of the op , NULL on error 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_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

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:
element_node the container node this on element is contained
Returns:
a char array of xml , returns NULL on error


Generated on Thu May 3 12:31:02 2007 for Axis2/C by  doxygen 1.4.6