Class SimpleHtmlSaxParser

Description

Converts HTML tokens into selected SAX events.

Located in /php_parser.php (line 543)


	
			
Method Summary
 static SimpleLexer createLexer ( &$parser, SimpleSaxParser $parser)
 SimpleHtmlSaxParser __construct (SimplePhpPageBuilder $listener)
 boolean acceptAttributeToken (string $token, integer $event)
 boolean acceptEndToken (string $token, integer $event)
 boolean acceptEntityToken (string $token, integer $event)
 boolean acceptStartToken (string $token, integer $event)
 boolean acceptTextToken (string $token, integer $event)
 boolean ignore (string $token, integer $event)
 boolean parse (string $raw)
Methods
static createLexer (line 580)

Sets up the matching lexer. Starts in 'text' mode.

  • return: Lexer suitable for this parser.
  • access: public
SimpleLexer createLexer ( &$parser, SimpleSaxParser $parser)
  • SimpleSaxParser $parser: Event generator, usually $self.
  • &$parser
Constructor __construct (line 555)

Sets the listener.

  • access: public
SimpleHtmlSaxParser __construct (SimplePhpPageBuilder $listener)
acceptAttributeToken (line 637)

Part of the tag data.

  • return: False if parse error.
  • access: public
boolean acceptAttributeToken (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
acceptEndToken (line 623)

Accepts a token from the end tag mode.

The element name is converted to lower case.

  • return: False if parse error.
  • access: public
boolean acceptEndToken (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
acceptEntityToken (line 658)

A character entity.

  • return: False if parse error.
  • access: public
boolean acceptEntityToken (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
acceptStartToken (line 595)

Accepts a token from the tag mode. If the

starting element completes then the element is dispatched and the current attributes set back to empty. The element or attribute name is converted to lower case.

  • return: False if parse error.
  • access: public
boolean acceptStartToken (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
acceptTextToken (line 669)

Character data between tags regarded as important.

  • return: False if parse error.
  • access: public
boolean acceptTextToken (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
ignore (line 680)

Incoming data to be ignored.

  • return: False if parse error.
  • access: public
boolean ignore (string $token, integer $event)
  • string $token: Incoming characters.
  • integer $event: Lexer event type.
parse (line 570)

Runs the content through the lexer which should call back to the acceptors.

  • return: False if parse error.
  • access: public
boolean parse (string $raw)
  • string $raw: Page text to parse.

Documentation generated on Sun, 31 Oct 2010 16:32:06 -0500 by phpDocumentor 1.4.3