AbstractSAXParser

The abstract SAX parser class.

This class represents a SAX parser. It is a abstract calss that must be implemented by the real parser that must extend this class

author

Andreas Aderhold [email protected]

author

Hans Lellelid [email protected]

copyright

2001,2002 THYRELL. All rights reserved

version

$Id: 5165c9c865864f7435cce69fb31522247fd970eb $

package

phing.parser

Methods

Method that gets invoked when the parser runs over CDATA.

characters(resource $parser, string $data) 

This method is called by PHP's internal parser functions and registered in the actual parser implementation.

It gives control to the current active handler object by calling the characters() method. That processes the given CDATA.

Throws
\Exception
  • Exceptions may be thrown by the Handler

Arguments

$parser

resource

php's internal parser handle.

$data

string

the CDATA

Method that gets invoked when the parser runs over a XML close element.

endElement(object $parser, string $name) 

This method is called by PHP's internal parser funcitons and registered in the actual parser implementation.

It gives control to the current active handler object by calling the endElement() method.

Throws
\Exception
  • Exceptions may be thrown by the Handler

Arguments

$parser

object

the php's internal parser handle

$name

string

the closing tag name

Entrypoint for parser. This method needs to be implemented by the child classt that utilizes the concrete parser

parse() 
abstract

Sets options for PHP interal parser. Must be implemented by the parser class if it should be used.

parserSetOption( $opt,  $val) : 
abstract

Arguments

$opt

$val

Response

Sets the current element handler object for this parser. Usually this is an object using extending "AbstractHandler".

setHandler(\AbstractHandler $obj) 

Arguments

$obj

\AbstractHandler

The handler object.

Method that gets invoked when the parser runs over a XML start element.

startElement(object $parser, string $name, array $attribs) 

This method is called by PHP's internal parser functions and registered in the actual parser implementation. It gives control to the current active handler object by calling the startElement() method.

Throws
\Exception
  • Exceptions may be thrown by the Handler

Arguments

$parser

object

the php's internal parser handle

$name

string

the open tag name

$attribs

array

the tag's attributes if any

Properties

handler

handler : \AbstractHandler
var

Type(s)

\AbstractHandler