/**
* Creates the ExpatParser, sets root handler and kick off parsing
* process.
*
* @throws BuildException if there is any kind of execption during
* the parsing process
* @access private
*/
protected function parse()
{
try {
$reader = new BufferedReader(new FileReader($this->buildFile));
$parser = new ExpatParser($reader);
$parser->parserSetOption(XML_OPTION_CASE_FOLDING, 0);
$parser->setHandler(new RootHandler($parser, $this));
$this->project->log("parsing buildfile " . $this->buildFile->getName(), Project::MSG_VERBOSE);
$parser->parse();
$reader->close();
} catch (Exception $exc) {
throw new BuildException("Error reading project file", $exc);
}
}