protected static function addNode(\SimpleXMLElement $source, \SimpleXMLElement $new)
	{
		// Add the new child node.
		$node = $source->addChild($new->getName(), trim($new));

		// Add the attributes of the child node.
		foreach ($new->attributes() as $name => $value)
		{
			$node->addAttribute($name, $value);
		}

		// Add any children of the new node.
		foreach ($new->children() as $child)
		{
			self::addNode($node, $child);
		}
	}
protected static function addNode(\SimpleXMLElement $source, \SimpleXMLElement $new)
	{
		// Add the new child node.
		$node = $source->addChild($new->getName(), trim($new));

		// Add the attributes of the child node.
		foreach ($new->attributes() as $name => $value)
		{
			$node->addAttribute($name, $value);
		}

		// Add any children of the new node.
		foreach ($new->children() as $child)
		{
			self::addNode($node, $child);
		}
	}
protected static function addNode ( \ SimpleXMLElement $ source , \ SimpleXMLElement $ new ) { // Add the new child node. $ node = $ source -> addChild ( $ new -> getName ( ) , trim ( $ new ) ) ; // Add the attributes of the child node. foreach ( $ new -> attributes ( ) as $ name => $ value ) { $ node -> addAttribute ( $ name , $ value ) ; } // Add any children of the new node. foreach ( $ new -> children ( ) as $ child ) { self :: addNode ( $ node , $ child ) ; } }
Adds a new child SimpleXMLElement node to the source.

@param   \SimpleXMLElement  $source  The source element on which to append.
@param   \SimpleXMLElement  $new     The new element to append.

@return  void

@since   1.0
Adds a new child SimpleXMLElement node to the source .