Here is the solution. Basically, you can make an XPath call to the result of a node to get all attribute elements with a name attribute equal to the author.
, , , [0], XPath . attributes() , , , .
$XML = simplexml_load_string($xml_string);
$XMLResults = $XML->xpath('/GSP/RES/R');
foreach($XMLResults as $Result) {
$Label = $Result->Label;
$AuthorAttribute = $Result->xpath('//Attribute[@name="author"]');
if($AuthorAttribute) {
$attributes = $AuthorAttribute[0]->attributes();
$Author = $attributes['value'];
}
else {
}
}