code: public function getAsDom()
      {
          $anyDataSet = XmlUtil::createXmlDocumentFromStr("<anydataset></anydataset>");
          $nodeRoot = $anyDataSet->getElementsByTagName("anydataset")->item(0);
          foreach ($this->collection as $sr) {
              $row = $sr->getAsDom();
              $nodeRow = $row->getElementsByTagName("row")->item(0);
              $newRow = XmlUtil::createChild($nodeRoot, "row");
              XmlUtil::addNodeFromNode($newRow, $nodeRow);
          }
  
          return $anyDataSet;
      }
docs: Returns the AnyDataset XmlDocument representive object
  
  @return \DOMDocument XmlDocument object
  @throws \ByJG\Util\Exception\XmlUtilException