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.
显示文件
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)
Starts the parsing process.
parserSetOption()
public method
Override PHP's parser default settings, created in the constructor.