"); $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:----GMILMbjE6XEvNsV07Lx8n2uJgnrdirOMsNsAhgZHhgOG9XbiGLt1grBn13ZQRu5lpfkJROGxVDJ1e8Wlf32q18D+919ag/dj7qB0r9jHCyBsENt3T9Cd2RMk2WYXc/4JGYuyymA7jVpu7bSJ/pFDyEle91tFlk6DDRydrCUhTQcEKdYOZKMA1xb7Xf/n1nm8cmWAcGwPRofmGFR9EEVx58B0yvRoY1eiveVtX48pa3yPjCqW3DZbP8zsmRtRKvFiP31LueH86i6nkxU0n0xZxqRwMD4RTAKzrD9S7HnE8T5lCRVveqXOcjg/IQCxLQQnip5O6FK9aUy5xaUsCySP0GpmmI4yal3efvA6M5L2S+JNAMge4XpsUzTcDKS+38uTnB5oiaenExYg294b29cltDkCmC/y8wq5FTsWsj2YnctOP6YqUo7BYQkp2zIl9GYxnio622Tkr6tFH1D27kROkpeA3T85lxBDKMXqKtb5KS00TmcaVitmiGNWpdnHR62euszeo8Hhu1vvATI1+YWqWeyyBqJH6lxsU8mfidn3dZ5BWmoEzWMz2PUY+/1n/GgmT4M3jiJfNF+fGFYiZBzqEiWakkFjdAl0+nNyqmnzyk9CIoao4mf3WBcGPsdIoCwT+dFVT0BZZ7Jt5tsi0K6uG/tvMtLvByNafUp2GNX5Idc=----ATTACHMENT:----NjMzNjEzMzU2MTA4NTQzNCA3OTY1MjA4NTQyNDgxNTYwIDY4NTYxOTg2MDg5MDI2MzI=