src/XML/DOM/FeedIdentifier.php
public function identifyFromTree( $tree )
	{
		$this->type		= "";
		$this->version	= "";
		$nodename	= strtolower( $tree->getNodeName() );
		switch( $nodename )
		{
			case 'feed':
				$type	= "ATOM";
				$version	= $tree->getAttribute( 'version' );
				break;
			case 'rss':
				$type	= "RSS";
				$version	= $tree->getAttribute( 'version' );
				break;
			case 'rdf:rdf':
				$type	= "RSS";
				$version	= "1.0";
				break;
		}
		if( $type && $version )
		{
			$this->type		= $type;
			$this->version	= $version;
			return $type."/".$version;
		}
		return false;
	}
public function identifyFromTree( $tree )
	{
		$this->type		= "";
		$this->version	= "";
		$nodename	= strtolower( $tree->getNodeName() );
		switch( $nodename )
		{
			case 'feed':
				$type	= "ATOM";
				$version	= $tree->getAttribute( 'version' );
				break;
			case 'rss':
				$type	= "RSS";
				$version	= $tree->getAttribute( 'version' );
				break;
			case 'rdf:rdf':
				$type	= "RSS";
				$version	= "1.0";
				break;
		}
		if( $type && $version )
		{
			$this->type		= $type;
			$this->version	= $version;
			return $type."/".$version;
		}
		return false;
	}
public function identifyFromTree ( $ tree ) { $ this -> type = "" ; $ this -> version = "" ; $ nodename = strtolower ( $ tree -> getNodeName ( ) ) ; switch ( $ nodename ) { case 'feed' : $ type = "ATOM" ; $ version = $ tree -> getAttribute ( 'version' ) ; break ; case 'rss' : $ type = "RSS" ; $ version = $ tree -> getAttribute ( 'version' ) ; break ; case 'rdf:rdf' : $ type = "RSS" ; $ version = "1.0" ; break ; } if ( $ type && $ version ) { $ this -> type = $ type ; $ this -> version = $ version ; return $ type . "/" . $ version ; } return false ; }
Identifies Feed from XML Tree.
@access		public
@param		XML_DOM_Node	$tree	XML Tree of Feed
@return		string
Identifies Feed from XML Tree .