Property | Type | Description | |
---|---|---|---|
$_handlerObj | object | handler object | |
$_validEncodings | array | valid encodings | |
$folding | boolean | If set to true, all tag and attribute names will be converted to UPPER CASE. | |
$fp | resource | File handle if parsing from a file | |
$handler | array | Mapping from expat handler function to class method. | |
$mode | string | Mode of operation, one of "event" or "func" | |
$parser | resource | XML parser handle | |
$srcenc | string | source encoding | |
$tgtenc | string | target encoding |
Method | Description | |
---|---|---|
XML_Parser ( string $srcenc = null, string $mode = 'event', string $tgtenc = null ) | Creates an XML parser. | |
__construct ( string $srcenc = null, string $mode = 'event', string $tgtenc = null ) | PHP5 constructor | |
_create ( ) : boolean | PEAR_Error | create the XML parser resource | |
_initHandlers ( ) : mixed | Init the element handlers | |
_parseString ( string $data, boolean $eof = false ) : boolean | XML_Parser::_parseString() | |
endHandler ( mixed $xp, mixed $elem ) : null | abstract method signature for End Handler | |
free ( ) : null | XML_Parser::free() | |
funcEndHandler ( mixed $xp, mixed $elem ) : void | derives and calls the End Handler function | |
funcStartHandler ( mixed $xp, mixed $elem, mixed $attribs ) : void | derives and calls the Start Handler function | |
parse ( ) : boolean | PEAR_Error | Central parsing function. | |
parseString ( string $data, boolean $eof = false ) : boolean | PEAR_Error | XML_Parser::parseString() | |
raiseError ( $message = NULL, integer $ecode = NULL, $mode = NULL, $options = NULL, $userinfo = NULL, $error_class = NULL, $skipmsg = false ) : XML_Parser_Error | XML_Parser::raiseError() | |
reset ( ) : boolean | object | Reset the parser. | |
setHandlerObj ( &$obj ) : boolean | Sets the object, that will handle the XML events | |
setInput ( mixed $fp ) : mixed | Sets the file handle to use with parse(). | |
setInputFile ( string $file ) : resource | Sets the input xml file to be parsed | |
setInputString ( string $data ) : null | XML_Parser::setInputString() | |
setMode ( string $mode ) : boolean | object | Sets the mode of the parser. | |
startHandler ( mixed $xp, mixed $elem, &$attribs ) : null | abstract method signature for Start Handler |
public XML_Parser ( string $srcenc = null, string $mode = 'event', string $tgtenc = null ) | ||
$srcenc | string | source charset encoding, use NULL (default) to use whatever the document specifies |
$mode | string | how this parser object should work, "event" for startelement/endelement-type events, "func" to have it call functions named after elements |
$tgtenc | string | a valid target encoding |
public __construct ( string $srcenc = null, string $mode = 'event', string $tgtenc = null ) | ||
$srcenc | string | source charset encoding, use NULL (default) to use whatever the document specifies |
$mode | string | how this parser object should work, "event" for startelement/endelement-type events, "func" to have it call functions named after elements |
$tgtenc | string | a valid target encoding |
public _initHandlers ( ) : mixed | ||
return | mixed |
public raiseError ( $message = NULL, integer $ecode = NULL, $mode = NULL, $options = NULL, $userinfo = NULL, $error_class = NULL, $skipmsg = false ) : XML_Parser_Error | ||
$ecode | integer | the error message code |
return | XML_Parser_Error | reference to the error object |
public setHandlerObj ( &$obj ) : boolean | ||
return | boolean | will always return true |
public setInputFile ( string $file ) : resource | ||
$file | string | Filename (full path) |
return | resource | fopen handle of the given file |
public setInputString ( string $data ) : null | ||
$data | string | a string containing the XML document |
return | null |
public bool $folding | ||
return | boolean |
public array $handler | ||
return | array |