src/XML/DOM/ObjectSerializer.php
public static function serialize( $object, $encoding = "utf-8" )
	{
		$root	= new XML_DOM_Node( "object" );
		$root->setAttribute( 'class', get_class( $object ) );
		$vars	= get_object_vars( $object );
		self::serializeVarsRec( $vars, $root );
		$builder	= new XML_DOM_Builder();
		$serial		= $builder->build( $root, $encoding );
		return $serial;
	}
public static function serialize( $object, $encoding = "utf-8" )
	{
		$root	= new XML_DOM_Node( "object" );
		$root->setAttribute( 'class', get_class( $object ) );
		$vars	= get_object_vars( $object );
		self::serializeVarsRec( $vars, $root );
		$builder	= new XML_DOM_Builder();
		$serial		= $builder->build( $root, $encoding );
		return $serial;
	}
public static function serialize ( $ object , $ encoding = "utf-8" ) { $ root = new XML_DOM_Node ( "object" ) ; $ root -> setAttribute ( 'class' , get_class ( $ object ) ) ; $ vars = get_object_vars ( $ object ) ; self :: serializeVarsRec ( $ vars , $ root ) ; $ builder = new XML_DOM_Builder ( ) ; $ serial = $ builder -> build ( $ root , $ encoding ) ; return $ serial ; }
Builds XML String from an Object.
@access		public
@static
@param		mixed		$object		Object to serialize
@param		string		$encoding	Encoding Type
@return		string
Builds XML String from an Object .