function parseDomDocument($domDoc) { $baseNode = $domDoc->document_element(); if ($baseNode->has_child_nodes()) { $child = $baseNode->first_child(); while ($child) { //if ($child->tagname=="Outbox") { if ($child->tagname) { $tempXmlStr = $domDoc->dump_node($child); $tempDomDoc = domxml_open_mem($tempXmlStr); $outbox = new Outbox(); $outbox->parseDomDocument($tempDomDoc); $this->arrayList[] = $outbox; } $child = $child->next_sibling(); } } else { return false; } return $this->setDomDocument(); }