public function load($xml, $options = array())
{
$this->_xmldoc = $this->_getParser()->parse($xml, $options);
$this->_refreshParser();
$params = $this->_getParameters($options);
$this->_getRoot($params)->load($this->_root_name, $object, $this->_xmldoc, $this->_factory->createXmlHelper($this->_xmldoc), $params);
return $object;
}
public function testRoundtripWithPreviousOnApiV1() { $xml = new Horde_Kolab_Format_Xml(new Horde_Kolab_Format_Xml_Parser(new DOMDocument('1.0', 'UTF-8')), new Horde_Kolab_Format_Factory(), array('version' => 1)); $first = $xml->save(array('uid' => 1)); $second = $xml->save($xml->load($first)); $this->assertEquals($this->removeLastModification($first), $this->removeLastModification($second)); }