/** * converte todos os registros para XML */ function allToXML($format = '%s', $utf8 = true) { $xml = '<?xml version="1.0" encoding="' . ($utf8 == true ? 'UTF-8' : 'ISO-8859-1') . '"?>' . PHP_EOL; if (!$this->rs) { return $xml; } if ($this->rs->NumRows() == 0) { return $xml; } $xml .= '<result-set>' . PHP_EOL; $this->rs->MoveFirst(); while ($this->fetch()) { $xml .= $this->toXML($format, $utf8, false); } $xml .= '</result-set>'; return $xml; }