RE: XML::Parser::PerlSAX -- characters() callback?
by Grant McLean other posts by this author
Jan 26 2001 4:36AM messages near this date
view in the new Beta List Site
Looking for SOAP resources
|
how to add a node in XML::DOM
From: Ken MacLeod [mailto:ken@[...].us]
>
> 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"
Great idea! So then people could say something like:
$p2 = new XML::Parser(Handlers => {Start => \&handle_start,
End => \&handle_end,
Char => \&handle_char}
MaxChar => 0);
It may be even easier for backwards compatability to use 'undef'
instead of (in addition to) -1 to indicate the current default
behaviour.
Regards
Grant
=====================================================================
Grant McLean | email: grantm@[...].nz | Lvl 6, BP House
The Web Limited | WWW: www.web.co.nz | 20 Customhouse Quay
Internet Solutions | Tel: +64 4 495 8250 | Box 1195, Wellington
Awesome service | Fax: +64 4 495 8259 | New Zealand
_______________________________________________
Perl-XML mailing list
Perl-XML@[...].com
http://listserv.ActiveState.com/mailman/listinfo/perl-xml
|