G'day mcoblentz,
It would appear that's poorly documented and read_chunk_of_data() is either pseudocode or a function you're supposed to write yourself.
I haven't used this module previously; however, something like this seems to be the intent:
$ perl -Mstrict -Mwarnings -e ' use XML::Rules; use Data::Dumper; my @xml = qw{<some_tag> some content </some_tag>}; my $parser = XML::Rules::->new( rules => [ _default => sub {$_[0] => $_[1]->{_content}} ] ); for (@xml) { $parser->parse_chunk($_); } my $data = $parser->last_chunk(); print Dumper $data; ' $VAR1 = { 'some_tag' => 'somecontent' };
Someone who's actually used the module before may have a better answer.
Update: Minor text change: s/write it yourself/write yourself/
-- Ken
In reply to Re: XML parsing with XML::Rules
by kcott
in thread XML parsing with XML::Rules
by mcoblentz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |