ExpatParser::parserSetOption PHP Method

parserSetOption() public method

Override PHP's parser default settings, created in the constructor.
public parserSetOption ( $opt, $val ) : boolean
return boolean true if the option could be set, otherwise false
    function parserSetOption($opt, $val)
    {
        return xml_parser_set_option($this->parser, $opt, $val);
    }

Usage Example

 /**
  * 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);
     }
 }
All Usage Examples Of ExpatParser::parserSetOption