Expat is an event-based parser that recognizes parts of the document (such as the start or end tag for an XML element) and calls any handlers registered for that type of an event. All handlers receive an instance of XML::Parser::Expat as their first argument.
- Init (
Called before parsing starts.
- Final (
Called after parsing has finished, but only if no errors occurred.
- Start (
Generated when an XML start tag is encountered.
Elementis the name of the XML element type.
Valpairs are generated for each attribute in the start tag of the element.
- End (
Generated when an XML end tag or empty tag (
<foo/>) is encountered.
- Char (
Generated when non-markup is recognized, with the non-markup sequence of characters in
Stringgiven to the handler in
- Proc (
Generated when a processing instruction is recognized.
- Comment (
Generated when a comment is recognized.
- CdataStart (
Called at the start of a CDATA section.
- CdataEnd (
Called at the end of a CDATA section.
- Default (
Called for any characters that aren’t tied to a registered handler, including markup declarations. Whatever the encoding in the original document, the string is returned to the handler in
- Unparsed (
Called for a declaration of an unparsed entity.
Entityis the name of the entity.
Baseis the base to be used for resolving a relative URI. ...