Simple::SAX::Serializer::Element - XML node element.
my $xml = Simple::SAX::Serializer->new; $xml->handler('dataset', sub { my ($self, $element, $parent) = @_; my $attributes = $element->attributes; my $children_result = $element->children_result; {properties => $attributes, dataset => $children_result} } ); $xml->handler('*', sub { my ($self, $element, $parent) = @_; my $attributes = $element->attributes; my $children_result = $parent->children_array_result; my $result = $parent->children_result; push @$children_result, $element->name => {%$attributes}; }); }
Represents xml node element.
None.
Stores reference to the xml node.
Return attributes as hash ref.
Returns children results.
Returns children result as array ref
Returns children result as hash ref
Sets children result
Return element's value.
Validates element attributes takes, required attributes parameter as array ref, optional attributes parameter as hash ref $element->validate_attributes(['name'], {type => 'text'});
The Simple::SAX::Serializer::Element 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.
Simple::SAX::Serializer Simple::SAX::Serializer::Parser
Adrian Witas, adrian@webapp.strefa.pl
See also
To install Simple::SAX::Serializer, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Simple::SAX::Serializer
CPAN shell
perl -MCPAN -e shell install Simple::SAX::Serializer
For more information on module installation, please visit the detailed CPAN module installation guide.