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
Afficher le fichier Open project: vjousse/symfony-1.4 Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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 méthode

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
Résultat object the location of the current parser

parse() public méthode

Starts the parsing process.
public parse ( ) : integer
Résultat integer 1 if the parsing succeeded

parserSetOption() public méthode

Override PHP's parser default settings, created in the constructor.
public parserSetOption ( $opt, $val ) : boolean
Résultat boolean true if the option could be set, otherwise false