axl main logo
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Modules Pages
void axl_doc_add_pi_target ( axlDoc doc,
char *  target,
char *  content 
)

Allows to configure a PI target, with its content, on the given axlDoc.

A PI is a process instruction that is passed to the application. This process instruction has a target name, which acording to the standard is the application which should receive the target content and an optional target content associated.

This function allows to configure (add) a new PI item inside the given xml document (axlDoc). The PI content is optional. If provided NULL, the PI will only contain as information the PI target.

Here is how a process instruction is used inside a xml document:

1 <?xml version='1.0'>
2 <?launch "some command" ?>
3 <complex>
4  <?data "some data" ?>
5  <?data "more data" ?>
6  <data>
7  <row attr="20" />
8  </data>
9 </complex>

Previous example shows how to use PI (process instructions) from outside the xml root node (complex, and also how it is used from inside a xml node definition complex.

As you can see, PI elements could be used as many times as you want and places allowed to do so are just right before begining with the root node and inside xml node definitions.

Parameters
docThe axlDocument where the PI will be added.
targetThe PI target name.
contentThe PI content (optional value).

References axl_list_add(), axl_pi_create(), and axl_return_if_fail.