Figure 5: Parsing the POX to return the array of search items found
// parse the xml
foreach($xml as $row)
{ if (isset($row->ERROR))
{ model_error($row->ERROR);
return False;
}
array_push
( $items,
array
( $row->PROD_ID,
$row->TITLE,
$row->AUTHOR,
$row->PRICE
)
);
}
return True;
}
?>