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
author | Hans Lellelid
copyright | 2001,2002 THYRELL. All rights reserved
version | $Id$
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.

### Parameters

#### $parser

`resource`

php's internal parser handle.

#### $data

`string`

the CDATA

### Exceptions

`\Exception` | - Exceptions may be thrown by the Handler

## 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.

### Parameters

#### $parser

`object`

the php's internal parser handle

#### $name

`string`

the closing tag name

### Exceptions

`\Exception` | - Exceptions may be thrown by the Handler

## Entrypoint for parser.

    parse()

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

## Sets options for PHP interal parser.

    parserSetOption($opt, $val)

Must be implemented by the parser class if it should be used.

### Parameters

#### $opt

#### $val

## Sets the current element handler object for this parser.

    setHandler(\AbstractHandler $obj)

Usually this is an object using extending "AbstractHandler".

### Parameters

#### $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.

### Parameters

#### $parser

`object`

the php's internal parser handle

#### $name

`string`

the open tag name

#### $attribs

`array`

the tag's attributes if any

### Exceptions

`\Exception` | - Exceptions may be thrown by the Handler

### Properties

##

    $handler