Thanks Jenda,

But it is a bit frustrating that I can't expect when the multiple calls will 
happen. For the same repetetive element, most of the time one call. But 
suddenly multiple calls take place.

Cheers,
Jason

> From: je...@krynicky.cz
> To: beginners@perl.org
> Date: Thu, 1 Jul 2010 08:09:20 +0200
> Subject: Re: A problem while using XML::Parser::PerlSAX
> 
> From: Jason Feng <q15...@hotmail.com>
> > I am using XML::Parser::PerlSAX
> > to parse a 300M XML file. I meet a strange issue with handler characters. 
> > This handler is supposed to return
> > all the contents between start markup and end markup. But sometimes it just
> > returns one part of the whole contents. On the second call, perhaps it 
> > returns
> > the rest part of the contents.
> 
> That is to be expected.
> 
> From the docs of XML::Parser:
> 
>   Char (Expat, String)
> 
>   This event is generated when non-markup is recognized. The 
>   non-markup sequence of characters is in String. A single 
>   non-markup sequence of characters may generate multiple calls 
>   to this handler. Whatever the encoding of the string in 
>   the original document, this is given to the handler in UTF-8.
> 
> Write your code so that it handles this. Or use a module that does 
> this for you.
> 
> Jenda
> ===== je...@krynicky.cz === http://Jenda.Krynicky.cz =====
> When it comes to wine, women and song, wizards are allowed 
> to get drunk and croon as much as they like.
>       -- Terry Pratchett in Sourcery
> 
> 
> -- 
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
> 
> 
                                          
_________________________________________________________________
If It Exists, You'll Find it on SEEK. Australia's #1 job site
http://clk.atdmt.com/NMN/go/157639755/direct/01/

Reply via email to