Adrian Witas > Simple-SAX-Serializer-0.05 > Simple::SAX::Serializer::Parser

Download:
Simple-SAX-Serializer-0.05.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  0
View/Report Bugs
Module Version: 0.03   Source  

NAME ^

Simple::SAX::Serializer::Parser - Xml parser

DESCRIPTION ^

Represents xml parser.

SYNOPSIS ^

    use Simple::SAX::Serializer;
    my $xml = Simple::SAX::Serializer->new(file_name => 'dummy.xml')

    $xml->handler('root/child', sub {
    my ($self, $element, $parent) = @_;
    my $attributes = $element->attributes;
    my $result = $parent->children_result;
    $result = $parent->result([])
      unless $result;
    push @$result,Child->new(%$attributes);
    });

METHODS

start_document

Handles the start of the document. Sets up state for the parse.

start_element

Handles the start of an element.

attributes
characters

Handles text data in the document.

end_element

Handles a closing tag.

root_args

Returns parse parameters. $xml->parse_string($xml_content, {root_param1 => 1, root_param2 => 2;});

COPYRIGHT AND LICENSE ^

The Simple::SAX::Serializer::Parser module is free software. You may distribute under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file.

SEE ALSO ^

Simple::SAX::Serializer

AUTHOR ^

Adrian Witas, adrian@webapp.strefa.pl

See also

syntax highlighting: