PEAR | --XML_Parser | --XML_Parser_Simple
This class is a simplified version of XML_Parser. In most XML applications the real action is executed, when a closing tag is found.
XML_Parser_Simple allows you to just implement one callback for each tag that will receive the tag with its attributes and CData.
[line 127]
Mapping from expat handler function to class method.XML_Parser_Simple __construct(
[string
$srcenc = null], [string
$mode = 'event'], [string
$tgtenc = null])
This is needed for PHP4 compatibility, it will call the constructor, when a new instance is created.
void addToData(
string
$data)
This is commonly needed, when a document is parsed recursively.
integer getCurrentDepth(
)
The root tag is in depth 0.
void handleElement(
string
$name, array
$attribs, string
$data)
Implement this in your parser
boolean|object reset(
)
This allows you to use one parser instance to parse multiple XML documents.