Source for file XML.php
Documentation is available at XML.php
// $Id: XML.php 583 2007-03-05 22:13:30Z jeichorn $
* XML Serializer - does NOT need a js serializer, use responseXML property in XmlHttpRequest
* @author Elizabeth Smith <auroraeosrose@gmail.com>
* @copyright 2005-2006 Elizabeth Smith
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version Release: @package_version@
* @link http://pear.php.net/package/PackageName
* Serializes a domdocument into an xml string
* Uses dom or domxml to dump a string from a DomDocument instance
* remember dom is always the default and this will die horribly without
* @param object $input instanceof DomDocument
* @return string xml string of DomDocument
// we check for the dom extension
return $input->saveXml ();
// then will check for domxml
return $input->dump_mem ();
$this->serializerNewType = 'Error';
return $error->serialize (array ('errStr'=> "Missing PHP Dom extension direct XML won't work"));
* Unserializes the xml string sent from the document
* Uses dom or domxml to pump a string into a DomDocument instance
* remember dom is always the default and this will die horribly without
* one or the other, and will throw warnings if you have bad xml
* @param string $input The input to serialize.
* @return object instanceofDomDocument
// we check for the dom extension
$doc = new DOMDocument ();
// then we check for the domxml extensions
return domxml_open_mem ($input);
// we give up and just return the xml directly
Documentation generated on Sat, 05 May 2007 18:00:26 -0400 by phpDocumentor 1.3.0. PEAR Logo Copyright © PHP Group 2004.
|