src/XML/DOM/Storage.php
protected function writeRecursive( &$node, $array )
	{
		foreach( $array as $key => $value )
		{
			if( is_array( $value ) )
			{
				$child	= new XML_DOM_Node( $this->getOption( 'tag_level' ) );
				$child->setAttribute( 'name', $key );
				$this->writeRecursive( $child, $array[$key] );
				$node->addChild( $child );
			}
			else
			{
				$child	= new XML_DOM_Node( $this->getOption( 'tag_pair' ) );
				$child->setAttribute( 'name', $key );
				$child->setAttribute( 'type', gettype( $value ) );
				$child->setContent( utf8_encode( $value ) );
				$node->addChild( $child );
			}
		}
	}
protected function writeRecursive( &$node, $array )
	{
		foreach( $array as $key => $value )
		{
			if( is_array( $value ) )
			{
				$child	= new XML_DOM_Node( $this->getOption( 'tag_level' ) );
				$child->setAttribute( 'name', $key );
				$this->writeRecursive( $child, $array[$key] );
				$node->addChild( $child );
			}
			else
			{
				$child	= new XML_DOM_Node( $this->getOption( 'tag_pair' ) );
				$child->setAttribute( 'name', $key );
				$child->setAttribute( 'type', gettype( $value ) );
				$child->setContent( utf8_encode( $value ) );
				$node->addChild( $child );
			}
		}
	}
protected function writeRecursive ( & $ node , $ array ) { foreach ( $ array as $ key => $ value ) { if ( is_array ( $ value ) ) { $ child = new XML_DOM_Node ( $ this -> getOption ( 'tag_level' ) ) ; $ child -> setAttribute ( 'name' , $ key ) ; $ this -> writeRecursive ( $ child , $ array [ $ key ] ) ; $ node -> addChild ( $ child ) ; } else { $ child = new XML_DOM_Node ( $ this -> getOption ( 'tag_pair' ) ) ; $ child -> setAttribute ( 'name' , $ key ) ; $ child -> setAttribute ( 'type' , gettype ( $ value ) ) ; $ child -> setContent ( utf8_encode ( $ value ) ) ; $ node -> addChild ( $ child ) ; } } }
Writes XML File recursive from Storage.
@access		protected
@param		XML_DOM_Node	$node		Current Node to read
@param		array			$array		Current Array in Storage
@return 	void
Writes XML File recursive from Storage .