Allows to get a list which contains axlPI nodes, representing all process instruction that the document has. While using PI, you can use the following functions to get PI information:
However, this function will return first ocurrency for PI found inside the xml document. If you don't use repeated PI elements, you won't find problems, but, if you need to iterate ever all PI found or you are using repeated PI, you can use this function as follows to get current pi elements: void show_all_pi (axlDoc * doc) { int iterator; axlPI * pi; axlList * PIs; // get all PI target that the document has PIs = axl_doc_get_pi_target_list (doc); iterator = 0; while (iterator < axl_list_length (PIs)) { // get next pi stored pi = axl_list_get_nth (PIs, iterator); // do some stuff printf ("PI found target name=%s, content=%s\n", axl_pi_get_name (pi), axl_pi_get_content (pi)); // update the iterator iterator++; } return; }
|