# pocessing instruction
[AXIOM]

## Typedefs
typedef struct axiom_processing_instruction | axiom_processing_instruction_t
## Functions
AXIS2_EXTERN axiom_processing_instruction_t * | axiom_processing_instruction_create (const axutil_env_t *env, axiom_node_t *parent, const axis2_char_t *target, const axis2_char_t *value, axiom_node_t **node)
AXIS2_EXTERN void | axiom_processing_instruction_free (struct axiom_processing_instruction *om_pi, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_processing_instruction_set_value (struct axiom_processing_instruction *om_pi, const axutil_env_t *env, const axis2_char_t *value)
AXIS2_EXTERN axis2_status_t | axiom_processing_instruction_set_target (struct axiom_processing_instruction *om_pi, const axutil_env_t *env, const axis2_char_t *target)
AXIS2_EXTERN axis2_char_t * | axiom_processing_instruction_get_target (struct axiom_processing_instruction *om_pi, const axutil_env_t *env)
AXIS2_EXTERN axis2_char_t * | axiom_processing_instruction_get_value (struct axiom_processing_instruction *om_pi, const axutil_env_t *env)
AXIS2_EXTERN axis2_status_t | axiom_processing_instruction_serialize (struct axiom_processing_instruction *om_pi, const axutil_env_t *env, axiom_output_t *om_output)

## Function Documentation

AXIS2_EXTERN axiom_processing_instruction_t* axiom_processing_instruction_create | ( | const axutil_env_t * | env,
|  | axiom_node_t * | parent,
|  | const axis2_char_t * | target,
|  | const axis2_char_t * | value,
|  | axiom_node_t ** | node |
| ) |  |  |

Creates a processing instruction

Parameters:

  | environment | Environment. MUST NOT be NULL.
  | parent | parent of the element node to be created. Optional, can be NULL.
  | target | target of the processing instruction.cannot be NULL.
  | value | value of the processing instruction.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_PROCESSING_INSTRUCTION

Returns:
  a pointer tonewly created processing instruction struct

AXIS2_EXTERN void axiom_processing_instruction_free | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env |
| ) |  |  |

Frees an instance of axiom_processing_instruction

Parameters:

  | om_pi | processing instruction to be freed.
  | env | Environment. MUST NOT be NULL, .

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

AXIS2_EXTERN axis2_char_t* axiom_processing_instruction_get_target | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env |
| ) |  |  |

Get PI target

Parameters:

  | om_pi | processing_instruction struct
  | env | Environment. MUST NOT be NULL, .

Returns:
  target text , NULL on error or if target is null

AXIS2_EXTERN axis2_char_t* axiom_processing_instruction_get_value | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env |
| ) |  |  |

Get data part of processing_instruction

Parameters:

  | om_pi | processing instruction
  | env | environment , MUST NOT be NULL.

Returns:
  data text , NULL if there is no data,

AXIS2_EXTERN axis2_status_t axiom_processing_instruction_serialize | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env,
|  | axiom_output_t * | om_output |
| ) |  |  |

Serialize function

Parameters:

  | om_pi | processing_instruction struct
  | env | environment, MUST NOT be NULL.
  | om_output | om_output handler struct

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

AXIS2_EXTERN axis2_status_t axiom_processing_instruction_set_target | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | target |
| ) |  |  |

Set processing instruction target

Parameters:

  | om_pi | processing_instruction struct
  | env | environment, MUST NOT be NULL.
  | target |

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

AXIS2_EXTERN axis2_status_t axiom_processing_instruction_set_value | ( | struct axiom_processing_instruction * | om_pi,
|  | const axutil_env_t * | env,
|  | const axis2_char_t * | value |
| ) |  |  |

Set processing instruction data

Parameters:

  | om_pi |
  | env | Environment. MUST NOT be NULL, .
  | value |