XML, the Perl Way

Processing XML with Perl Michel Rodriguez

Introduction to XML::Parser

XML::Parser Handlers

XML::Parser Methods

XML::Parser offers 2 main methods::

XML::Parser::Expat Methods

those methods can be called from any handler:

Method Return value
depth the current depth in the tree during parsing
in_element( $gi) true if the current element is $gi
within_element( $gi) the number of times $gi appears in the current context list
recognized_string the UTF-8 encoded string recognized by the parser
original_string the original string recognized by the parser


Introduction to XML::Parser

XML::Parser Handlers