if you're using PHP 5 it has a nice Simple XML extension. say a variable called $returnString has the XML, you can use:
$xmlObj = simplexml_load_string($returnString);
from there, you can reference the XML in a tree-like manner, with attributes and child elements being referenced like objects, so say you have:
<?xml version="1.0" encoding="UTF-8"?>
<veryTop>
<firstChild>
<data>some text 1</data>
</firstChild>
<secondChild qual="2">
<data>some text 2</data>
</secondChild>
</veryTop>
[code]
if you load that string in thru SimpleXML into the $xmlObj, you can reference the elements and attributes like so:
[code]
<!-- element data -->
$dataStr = $xmlObj->firstChild->data;
<!-- attribute data -->
$attrStr = $xmlObj->secondChild['qual'];
there are great tutorials straight from Zend.