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