in reply to XML-Parser-PerlSAX how to get the BytePosition value
sub location { my $self = shift; my $expat = $self->{Expat}; my @properties = ( ColumnNumber => $expat->current_column, LineNumber => $expat->current_line, BytePosition => $expat->current_byte, Base => $expat->base ); # FIXME these locations change while parsing external entities push (@properties, PublicId => $self->{Source}{PublicId}) if (defined $self->{Source}{PublicId}); push (@properties, SystemId => $self->{Source}{SystemId}) if (defined $self->{Source}{SystemId}); return { @properties }; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: XML-Parser-PerlSAX how to get the BytePosition value
by Anonymous Monk on Apr 01, 2008 at 14:23 UTC | |
by quaker (Initiate) on May 13, 2008 at 22:26 UTC |