in reply to Re^2: XML-Parser-PerlSAX how to get the BytePosition value
in thread XML-Parser-PerlSAX how to get the BytePosition value
sub new { my $proto = shift; my $class = ref($proto) || $proto; my $self = {}; return bless $self, $class; } sub start_document { # Empty. But MUST exist. } sub set_document_locator { my ($self, $params) = @_; $self->{'_parser'} = $params->{'Locator'}; } sub start_element { my $self = shift; print Dumper($self->{'_parser'}->location()); }
|
|---|