# data_source
[AXIOM]

## Typedefs
typedef struct axiom_data_source | axiom_data_source_t
| data_source struct Handles the XML data_source in OM
## Functions
AXIS2_EXTERN axiom_data_source_t * | axiom_data_source_create (const axutil_env_t *env, axiom_node_t *parent, axiom_node_t **node)
AXIS2_EXTERN void | axiom_data_source_free (struct axiom_data_source *om_data_source, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_data_source_serialize (struct axiom_data_source *om_data_source, const axutil_env_t *env, axiom_output_t *om_output)
AXIS2_EXTERN axutil_stream_t * | axiom_data_source_get_stream (struct axiom_data_source *om_data_source, const axutil_env_t *env)

## Function Documentation

AXIS2_EXTERN axiom_data_source_t* axiom_data_source_create | ( | const axutil_env_t * | env,
|  | axiom_node_t * | parent,
|  | axiom_node_t ** | node |
| ) |  |  |

Creates a new data_source struct

Parameters:

  | env | Environment. MUST NOT be NULL, .
  | parent | parent of the new node. Optinal, can be NULL. The parent element must be of type AXIOM_ELEMENT
  | value | Text value. Optinal, can be NULL.
  | comment_node | This is an out parameter. cannot be NULL. Returns the node corresponding to the data_source struct created. Node type will be set to AXIOM_DATA_SOURCE

Returns:
  pointer to newly created data_source struct

AXIS2_EXTERN void axiom_data_source_free | ( | struct axiom_data_source * | om_data_source,
|  | const axutil_env_t * | env |
| ) |  |  |

Free an axiom_data_source struct

Parameters:

  | env | environment. MUST NOT be NULL.
  | om_data_source | pointer to om data_source struct to be freed.

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

AXIS2_EXTERN axutil_stream_t* axiom_data_source_get_stream | ( | struct axiom_data_source * | om_data_source,
|  | const axutil_env_t * | env |
| ) |  |  |

set the data_source value

Parameters:

  | om_data_source | om_data_source struct
  | env | environment , MUST NOT be NULL.
  | value | data_source

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

AXIS2_EXTERN axis2_status_t axiom_data_source_serialize | ( | struct axiom_data_source * | om_data_source,
|  | const axutil_env_t * | env,
|  | axiom_output_t * | om_output |
| ) |  |  |

Serialize op

Parameters:

  | env | environment. MUST NOT be NULL.
  | om_data_source | pointer to om data_source struct to be serialized.
  | om_output | AXIOM output handler to be used in serializing.

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