GNU.WIKI: The GNU/Linux Knowledge Base

  [HOME] [PHP Manual] [HowTo] [ABS] [MAN1] [MAN2] [MAN3] [MAN4] [MAN5] [MAN6] [MAN7] [MAN8] [MAN9]

  [0-9] [Aa] [Bb] [Cc] [Dd] [Ee] [Ff] [Gg] [Hh] [Ii] [Jj] [Kk] [Ll] [Mm] [Nn] [Oo] [Pp] [Qq] [Rr] [Ss] [Tt] [Uu] [Vv] [Ww] [Xx] [Yy] [Zz]


       XML::Filter::BufferText - Filter to put all characters() in one event


         my $h = SomeHandler->new;
         my $f = XML::Filter::BufferText->new( Handler => $h );
         my $p = SomeParser->new( Handler => $f );


       This is a very simple filter. One common cause of grief (and programmer
       error) is that XML parsers aren't required to provide character events
       in one chunk. They can, but are not forced to, and most don't. This
       filter does the trivial but oft-repeated task of putting all characters
       into a single event.

       Note that this won't help you cases such as:

         <foo> blah <!-- comment --> phubar </foo>

       In the above case, given the interleaving comment, there will be two
       "character()" events. This may be worked around in the future if there
       is demand for it.

       An interesting way to use this filter, instead of telling users to use
       it, is to return it from your handler's constructor, already configured
       and all.  That'll make the buffering totally transparent to them
       ("XML::SAX::Writer" does that).


       Robin Berjon,


       Copyright (c) 2001-2002 Robin Berjon. All rights reserved. This program
       is free software; you can redistribute it and/or modify it under the
       same terms as Perl itself.


       XML::SAX::*, XML::Generator::*, XML::Handler::*, XML::Filter::*

  All copyrights belong to their respective owners. Other content (c) 2014-2018, GNU.WIKI. Please report site errors to
Page load time: 0.090 seconds. Last modified: November 04 2018 12:49:43.