RE: XML::Parser::PerlSAX -- characters() callback?
by Archie Russell other posts by this author
Jan 25 2001 1:00PM messages near this date
view in the new Beta List Site
Re: XPath - save a file
|
Problems installing XML::DOM
this would be an immense help. i'd actually like the default to be
"unlimited" size, which
is the probably the most common case [but might break existing code on big
pieces of data]
-a
> -----Original Message-----
> From: Ken MacLeod [mailto:ken@[...].us]
> Sent: Thursday, January 25, 2001 7:20 AM
> To: perl-xml@[...].com
> Subject: Re: XML::Parser::PerlSAX -- characters() callback?
>
>
> Matt Sergeant <matt@[...].org> writes:
>
> > On Thu, 25 Jan 2001, Steve Tinney wrote:
>
> > > So, if you want to process the text content as a unit, you just
> > > collect it up and operated on it when you get and end tag event.
> >
> > Or comment, or PI, or start tag, or... :-)
>
> Since this is a very common error or misconception, I was wondering if
> there weren't some way to re-address it so it becomes much more
> obvious and I think I have it: A parser feature specifying the maximum
> number of characters to return in a single characters() call:
>
> * > 0 for a given maximum size
> * 0 for unlimited (watch out!), and
> * -1 for "as the parser sees fit"
>
> -1 is the current behavior and would be the default for this feature.
>
> 0 would automatically collect all characters into one call, which is
> what most people who run into this are looking for, even if it can
> bite them sometimes.
>
> This way, whenever this question comes up, we can simply point to the
> feature, which will include a summary of the issues and code fragments
> for how to deal with consecutive characters() calls.
>
> Anyone else think that would help?
>
> -- Ken
> _______________________________________________
> Perl-XML mailing list
> Perl-XML@[...].com
> http://listserv.ActiveState.com/mailman/listinfo/perl-xml
>
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml
|