public function parse() {
		$fp = fopen($this->file, "r");
		if (!$fp) {
			throw new Exception("Could not open XML input file");
		}

		$data = fread($fp, 4096);
		while ($data) {
			if (!xml_parse($this->xmlParser, $data, feof($fp))) {
				$errorString = xml_error_string(xml_get_error_code($this->xmlParser));
				$errorLineNo = xml_get_current_line_number($this->xmlParser);
				$msg = sprintf("Warning: XML error: %s at line %d", $errorString, $errorLineNo);
				echo $msg;
				$this->config = array();
			}

			$data = fread($fp, 4096);
		}
	}
public function parse() {
		$fp = fopen($this->file, "r");
		if (!$fp) {
			throw new Exception("Could not open XML input file");
		}

		$data = fread($fp, 4096);
		while ($data) {
			if (!xml_parse($this->xmlParser, $data, feof($fp))) {
				$errorString = xml_error_string(xml_get_error_code($this->xmlParser));
				$errorLineNo = xml_get_current_line_number($this->xmlParser);
				$msg = sprintf("Warning: XML error: %s at line %d", $errorString, $errorLineNo);
				echo $msg;
				$this->config = array();
			}

			$data = fread($fp, 4096);
		}
	}
public function parse ( ) { $ fp = fopen ( $ this -> file , "r" ) ; if ( ! $ fp ) { throw new Exception ( "Could not open XML input file" ) ; } $ data = fread ( $ fp , 4096 ) ; while ( $ data ) { if ( ! xml_parse ( $ this -> xmlParser , $ data , feof ( $ fp ) ) ) { $ errorString = xml_error_string ( xml_get_error_code ( $ this -> xmlParser ) ) ; $ errorLineNo = xml_get_current_line_number ( $ this -> xmlParser ) ; $ msg = sprintf ( "Warning: XML error: %s at line %d" , $ errorString , $ errorLineNo ) ; echo $ msg ; $ this -> config = array ( ) ; } $ data = fread ( $ fp , 4096 ) ; } }
Parses the configuration file and stores the values.

@throws Exception if cannot access file
Parses the configuration file and stores the values .