src/XML/DOM/SyntaxValidator.php
public function validate( $xml )
	{
		$this->document	= new DOMDocument();
		ob_start();
		$this->document->validateOnParse	= TRUE;
		$this->document->loadXML( $xml );
		$this->errors	= ob_get_contents();
		ob_end_clean();
		if( !$this->errors )
			return TRUE;
		return FALSE;
	}
public function validate( $xml )
	{
		$this->document	= new DOMDocument();
		ob_start();
		$this->document->validateOnParse	= TRUE;
		$this->document->loadXML( $xml );
		$this->errors	= ob_get_contents();
		ob_end_clean();
		if( !$this->errors )
			return TRUE;
		return FALSE;
	}
public function validate ( $ xml ) { $ this -> document = new DOMDocument ( ) ; ob_start ( ) ; $ this -> document -> validateOnParse = TRUE ; $ this -> document -> loadXML ( $ xml ) ; $ this -> errors = ob_get_contents ( ) ; ob_end_clean ( ) ; if ( ! $ this -> errors ) return TRUE ; return FALSE ; }
Validates XML Document.
@access		public
@param		string		$xml		XML to be validated
@return		bool
Validates XML Document .