i got this XML:\[code\] <shipping_line> <article id="960382" quantity="500" /> <article id="960560" quantity="150" /> <article id="960426" quantity="250" /> <article id="1177" quantity="100" > <product>5500070000126273</product> <product>5500070000126264</product> <product>5500070000126255</product> <product>5500070000126246</product> <product>5500070000126237</product> </article> </shipping_line>\[/code\]and i access the article elements \[code\]atributes\[/code\] id and \[code\]quantity\[/code\] like this:\[code\]$atrs = $xml->xpath('//article[not(node())]/@quantity | //article[not(node())]/@id');\[/code\]now i would like to access the 2 values i made a foreach like this: \[code\] foreach ($atrs as $id => $val ) { error_log(print_r($val , true)); }\[/code\]And my error log shows this:\[code\] SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [id] => 960382\n )\n\n)\n SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [quantity] => 500\n )\n\n)\n SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [id] => 960560\n )\n\n)\n SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [quantity] => 150\n )\n\n)\n SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [id] => 960426\n )\n\n)\n SimpleXMLElement Object\n(\n [@attributes] => Array\n (\n [quantity] => 250\n )\n\n)\n\[/code\]how could i access the 2 values so i can use a function like \[code\]someFunctionUsing2Values($article_no , $quantity)\[/code\]