/** * Serialize to xml * * @return DOMDocument */ public function toXML() { $xml = new \DOMDocument(); $xml->loadXML("<pazpar2options />"); Parser::addToXml($xml, 'user-options', $this->getAllSessionData()); return $xml; }