public function addChild( $name, $value = NULL, $nsPrefix = NULL, $nsURI = NULL )
	{
		$child		= NULL;
		if( $nsPrefix )
		{
			$namespaces	= $this->getDocNamespaces();
			$key		= $nsPrefix ? $nsPrefix.':'.$name : $name;
			if( array_key_exists( $nsPrefix, $namespaces ) )
				$child	= parent::addChild( $name, NULL, $namespaces[$nsPrefix] );
			else if( $nsURI )
				$child	= parent::addChild( $key, NULL, $nsURI );
			else
				throw new RuntimeException( 'Namespace prefix is not registered and namespace URI is missing' );
		}
		else
			$child	= parent::addChild( $name );
		if( $value !== NULL )
			$child->setValue( $value );
		return $child;
	}