PHP 클래스 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.
저자: Andreas Aderhold ([email protected])
상속: extends AbstractSAXParser
파일 보기 프로젝트 열기: vjousse/symfony-1.4 1 사용 예제들

공개 메소드들

메소드 설명
__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.

메소드 상세

__construct() 공개 메소드

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() 공개 메소드

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
리턴 object the location of the current parser

parse() 공개 메소드

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

parserSetOption() 공개 메소드

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