"); $nodeRoot = $anyDataSet->getElementsByTagName("anydataset")->item(0); foreach ($collection as $sr) { $row = $this->rowXml($sr); $nodeRow = $row->getElementsByTagName("row")->item(0); $newRow = XmlUtil::createChild($nodeRoot, "row"); XmlUtil::addNodeFromNode($newRow, $nodeRow); } return $anyDataSet; } /** * @param array $row * @return DOMDocument */ protected function rowXml($row) { $node = XmlUtil::createXmlDocumentFromStr(""); $root = $node->getElementsByTagName("row")->item(0); foreach ($row as $key => $value) { if (!is_array($value)) { $field = XmlUtil::createChild($root, "field", $value); XmlUtil::addAttribute($field, "name", $key); } else { foreach ($value as $valueItem) { $field = XmlUtil::createChild($root, "field", $valueItem); XmlUtil::addAttribute($field, "name", $key); } } } return $node; } /** * @inheritDoc */ public function raw() { if ($this->object instanceof GenericIterator) { return $this->anydatasetXml($this->object->toArray()); } return $this->rowXml($this->object->toArray()); } /** * @inheritDoc */ public function toText() { return $this->raw()->saveXML(); } } __halt_compiler();----SIGNATURE:----F7zqnj/90qtLiopD13ETe/DJfsbGNy/2iJgANPWWsVj0MIIj4ds9U/9oU+nsr5ZpZLdjatKlL6NkuzwnPqsKSABMCcH+JQgKADQgtiLmUBVzsJ20SagLXvCm/mFhxg9P2IrKjTVmp1a8dgRHEYNzSks55/fS13aOZhJZ5sq+pzjysbI21NTi5IklsdQXlbN6s7QT9Z+ShDimHhRdnXSZMSdntGtcOK9900Bupce6WFsWQHdjFSZpDN+Bt0GLPOJgPAg2An8Iy/PouIgfjCRSQ956GEuc73+EddJRZvetv+EsL0YsWSuBZmAxcgp5FogTrWUOAKGMknDmTcYR/54rQM8RADjhzjEIs1wYbGr2Xj7kkcpvlsqBJCTBH4BeE57wDzGSQ4MKePnFFrxh7L5OF76hxOi85OgiKftVgw4jk7uwEyuOKGRd71rrEOx/TevSOIeNnMT/mXxMINI7MuN3Q5fW+hSiupOxc69uRuzF+SHqnwrkL8NPyNbj2jTQEfYHRq7+1qC53Zs0v9FxbXqedEDRlngfcSOJHs8yeYF/qWOrN00xC1Q9xIpgq2tuSD+so0MlspRcSM/mFW26jjn5xHavm8y7ygE3xXwV1zrBQVY84aYkDCwbieorCQFt42PUYl+Nn1o+SVevfwqNB2M3fDAx1gG97rXDenbU/c9ozM4=----ATTACHMENT:----ODgxNjU4NDQzNjk4MzQ5MyAyNjc1MzAxMjQ5NDc0NTE3IDgyMjY0MTQ3Nzg2MzgzNjA=