PHP Class ExpatParser, symfony-1.4

It takes an XML file represented by a abstract path name, and starts parsing the file and calling the different "trap" methods inherited from the AbstractParser class. Those methods then invoke the represenatative methods in the registered handler classes.
Author: Andreas Aderhold ([email protected])
Inheritance: extends AbstractSAXParser
Show file Open project: vjousse/symfony-1.4 Class Usage Examples

Public Methods

Method Description
__construct ( Reader $reader, string $filename = null ) Constructs a new ExpatParser object.
getLocation ( ) : object Returns the location object of the current parsed element. It describes the location of the element within the XML file (line, char)
parse ( ) : integer Starts the parsing process.
parserSetOption ( $opt, $val ) : boolean Override PHP's parser default settings, created in the constructor.

Method Details

__construct() public method

The constructor accepts a PhingFile object that represents the filename for the file to be parsed. It sets up php's internal expat parser and options.
public __construct ( Reader $reader, string $filename = null )
$reader Reader The Reader Object that is to be read from.
$filename string Filename to read.

getLocation() public method

Returns the location object of the current parsed element. It describes the location of the element within the XML file (line, char)
public getLocation ( ) : object
return object the location of the current parser

parse() public method

Starts the parsing process.
public parse ( ) : integer
return integer 1 if the parsing succeeded

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