# 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 andi@binarycloud.com
author | Hans Lellelid hans@xmpl.org
copyright | 2001,2002 THYRELL. All rights reserved
version | $Id: e6378f0fcd291f9a2ccb23f6c82aeda662c9492b $
package | phing.parser

### Methods

## Constructs a SAX parser

    __construct()

## 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 | 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( $parser,  $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 | Exceptions may be thrown by the Handler

### Arguments

#### $parser

``

#### $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( $parser,  $name,  $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 | Exceptions may be thrown by the Handler

### Arguments

#### $parser

``

#### $name

``

#### $attribs

``

### Properties

## The AbstractHandler object.

    handler :

### Type(s)

``