aux data (<æøå>) */ private $infos = array(); public function __construct(SimpleXmlElement $xml) { if(isset($xml->PaymentInfo)) { foreach($xml->PaymentInfo as $paymentInfo) { $attrs = $paymentInfo->attributes(); $this->infos[(string)$attrs['name']] = (string)$paymentInfo; } } } public function getAll() { return $this->infos; } public function getInfo($key) { return @$this->infos[$key]; } }