src/XML/Atom/Parser.php
public function parse( $xml, $validateRules = TRUE )
	{
		$this->language		= "en";
		$this->channelData	= $this->emptyChannelData;
		$this->entries		= array();
			
		$root		= new XML_Element( $xml );
		if( $validateRules )
		{
			$validator	= new XML_Atom_Validator();
			if( !$validator->isValid( $root ) )	
				throw new Exception( $validator->getFirstError() );
		}

		$this->language		= $this->getNodeLanguage( $root );
		$this->channelData	= $this->parseNodes( $root, $this->emptyChannelData );
	}
public function parse( $xml, $validateRules = TRUE )
	{
		$this->language		= "en";
		$this->channelData	= $this->emptyChannelData;
		$this->entries		= array();
			
		$root		= new XML_Element( $xml );
		if( $validateRules )
		{
			$validator	= new XML_Atom_Validator();
			if( !$validator->isValid( $root ) )	
				throw new Exception( $validator->getFirstError() );
		}

		$this->language		= $this->getNodeLanguage( $root );
		$this->channelData	= $this->parseNodes( $root, $this->emptyChannelData );
	}
public function parse ( $ xml , $ validateRules = TRUE ) { $ this -> language = "en" ; $ this -> channelData = $ this -> emptyChannelData ; $ this -> entries = array ( ) ; $ root = new XML_Element ( $ xml ) ; if ( $ validateRules ) { $ validator = new XML_Atom_Validator ( ) ; if ( ! $ validator -> isValid ( $ root ) ) throw new Exception ( $ validator -> getFirstError ( ) ) ; } $ this -> language = $ this -> getNodeLanguage ( $ root ) ; $ this -> channelData = $ this -> parseNodes ( $ root , $ this -> emptyChannelData ) ; }
Parses XML String and stores Channel Data and Entries.
@access		public
@param		string		$xml				XML String to parse
@param		bool		$validateRules		Validate Atom Feed against Atom Rules.
@return		void
Parses XML String and stores Channel Data and Entries .