Class SAXY_Parser_Base

Description

The base SAX Parser class

Located in /includes/domit/xml_saxy_shared.php (line 34)


	
			
Direct descendents
Class Description
SAXY_Lite_Parser The SAX Parser class
SAXY_Parser The SAX Parser class
Variable Summary
Method Summary
SAXY_Parser_Base SAXY_Parser_Base ()
void appendEntityTranslationTable (array $table)
void convertEntities (boolean $truthVal)
void fireCDataSectionEvent (string $data)
void fireCharacterDataEvent (string $data)
void fireEndElementEvent (string $tagName)
void fireStartElementEvent (string $tagName, Array $attributes)
string getCharFromEnd (string $text, int $index)
Array parseAttributes (string $attrText)
void parseBetweenTags (string $betweenTagText)
void xml_set_cdata_section_handler (mixed $handler)
void xml_set_character_data_handler (mixed $handler)
void xml_set_element_handler (mixed $startHandler, mixed $endHandler)
Variables
Object $cDataSectionHandler = null (line 46)
  • var: A reference to the CDATA Section event handler
Object $characterDataHandler (line 44)
  • var: A reference to the data event handler
int $charContainer (line 38)
  • var: A temporary container for parsed characters
boolean $convertEntities = true (line 48)
  • var: True if predefined entities are to be converted into characters
Array $definedEntities = array() (line 53)
  • var: User defined translation table for entities
Object $endElementHandler (line 42)
  • var: A reference to the end event handler
Array $predefinedEntities = array('&amp;' => '&', '&lt;' => '<', '&gt;' => '>',
'&quot;' => '"', '&apos;' => "'")
(line 50)
  • var: Translation table for predefined entities
Object $startElementHandler (line 40)
  • var: A reference to the start event handler
int $state (line 36)
  • var: The current state of the parser
Methods
Constructor SAXY_Parser_Base (line 59)

Constructor for SAX parser

SAXY_Parser_Base SAXY_Parser_Base ()
appendEntityTranslationTable (line 103)

Appends an array of entity mappings to the existing translation table

Intended mainly to facilitate the conversion of non-ASCII entities into equivalent characters

void appendEntityTranslationTable (array $table)
  • array $table: A list of entity mappings in the format: array('&amp;' => '&');
convertEntities (line 92)

Sets whether predefined entites should be replaced with their equivalent characters during parsing

void convertEntities (boolean $truthVal)
  • boolean $truthVal: True if entity replacement is to occur
fireCDataSectionEvent (line 282)

Fires a CDATA Section event

void fireCDataSectionEvent (string $data)
  • string $data: The CDATA Section data
fireCharacterDataEvent (line 269)

Fires a character data event

void fireCharacterDataEvent (string $data)
  • string $data: The character data
fireEndElementEvent (line 261)

Fires an end element event

void fireEndElementEvent (string $tagName)
  • string $tagName: The end element tag name
fireStartElementEvent (line 253)

Fires a start element event

void fireStartElementEvent (string $tagName, Array $attributes)
  • string $tagName: The start element tag name
  • Array $attributes: The start element attributes
getCharFromEnd (line 114)

Gets the nth character from the end of the string

  • return: The found character
string getCharFromEnd (string $text, int $index)
  • string $text: The text to be queried
  • int $index: The index from the end of the string
parseAttributes (line 126)

Parses the attributes string into an array of key / value pairs

  • return: An array of key / value pairs
Array parseAttributes (string $attrText)
  • string $attrText: The attribute text
parseBetweenTags (line 242)

Parses character data

void parseBetweenTags (string $betweenTagText)
  • string $betweenTagText: The character data
xml_set_cdata_section_handler (line 84)

Sets a reference to the handler for the CDATA Section event

void xml_set_cdata_section_handler (mixed $handler)
  • mixed $handler: A reference to the CDATA Section handler
xml_set_character_data_handler (line 76)

Sets a reference to the handler for the data event

void xml_set_character_data_handler (mixed $handler)
  • mixed $handler: A reference to the data handler
xml_set_element_handler (line 67)

Sets a reference to the handler for the start element event

void xml_set_element_handler (mixed $startHandler, mixed $endHandler)
  • mixed $startHandler: A reference to the start element handler

Documentation generated on Fri, 4 Mar 2005 13:58:07 +1000 by phpDocumentor 1.3.0RC3