function parseDomDocument($domDoc) { $baseNode = $domDoc->document_element(); if ($baseNode->has_child_nodes()) { $child = $baseNode->first_child(); while ($child) { if ($child->tagname) { $tempXmlStr = $domDoc->dump_node($child); $tempDomDoc = domxml_open_mem($tempXmlStr); $mergedReceipt = new MergedReceipt(); $mergedReceipt->parseDomDocument($tempDomDoc); $this->arrayList[] = $mergedReceipt; } $child = $child->next_sibling(); } } $this->setDomDocument(); return true; }