Class BasicXmlParser

Description

An XML parser that extends the functionality of PEAR XML_Parser module.

Located in /parser/BasicXmlParser.php (line 26)

XML_Parser
   |
   --BasicXmlParser
Direct descendents
Class Description
CoverageXmlParser Special parser for SpikePHPCoverage data parsing
Variable Summary
mixed $docroot
mixed $openTags
Method Summary
BasicXmlParser BasicXmlParser ()
void cdataHandler ($xp $xp, $cdata $cdata)
void endHandler ($xp $xp, $name $name)
String getCData ()
Array getDocumentArray ()
String getLastOpenTag ($tag $tag)
Array handleAttrTag ($name $name, $attrs $attrs)
void startHandler ($xp $xp, $name $name, $attributes $attributes)
Variables
mixed $docroot (line 30)
  • access: protected
mixed $openTags (line 29)
  • access: protected
Methods
Constructor BasicXmlParser (line 39)

Constructor

  • access: public
BasicXmlParser BasicXmlParser ()
cdataHandler (line 116)

Function to handle character data

  • access: public
void cdataHandler ($xp $xp, $cdata $cdata)
  • $xp $xp: XMLParser handle
  • $cdata $cdata: Character data
endHandler (line 87)

Function to handle end of an element

  • access: public
void endHandler ($xp $xp, $name $name)
  • $xp $xp: XML_Parser handle
  • $name $name: Name of the element
getCData (line 129)

Returns the CData collected so far.

  • return: Character data collected.
  • access: public
String getCData ()
getDocumentArray (line 164)

Return the document array gathered during parsing.

Document array is a data structure that mimics the XML contents.

  • return: Document array
  • access: public
Array getDocumentArray ()
getLastOpenTag (line 143)

Returns the name of parent tag of give tag

  • return: Name of the parent tag of $tag
  • access: public
String getLastOpenTag ($tag $tag)
  • $tag $tag: Name of a child tag
handleAttrTag (line 54)

Function that handles an element with attributes.

  • return: An element
  • access: public
Array handleAttrTag ($name $name, $attrs $attrs)
  • $name $name: Name of the element
  • $attrs $attrs: Attributes array (name, value pairs)
startHandler (line 73)

Function to handle start of an element

  • access: public
void startHandler ($xp $xp, $name $name, $attributes $attributes)
  • $xp $xp: XMLParser handle
  • $name $name: Element name
  • $attributes $attributes: Attribute array

Redefined in descendants as:

Documentation generated on Mon, 20 Jun 2005 13:11:03 -0700 by phpDocumentor 1.3.0RC3