ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> perl-xml
perl-xml
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved