XML::L...kParser(3pm)
π XML::LibXML::SAX::ChunkParser β parse XML chunks via LibXML SAX π
okay so bestie, gather round, because this is one of those little modules that just gets it. It's XML::LibXML::SAX::ChunkParser, and yeah the name is a mouthful, but it's part of the User Contributed Perl Documentation fam and it lives in section 3pm. Let's go π«Ά
β¨ SYNOPSIS β¨
like, this is the whole vibe right here:
local $XML::SAX::ParserPackage = 'XML::LibXML::SAX::ChunkParser';
my $parser = XML::SAX::ParserFactory->parser(Handler => $myhandler);
$parser->parse_chunk($xml_chunk);
you set the package, you get your parser from the factory with your handler, and then you just keep feeding it chunks. iconic behavior honestly π
πΈ DESCRIPTION πΈ
so here's the tea π β this module uses XML::LibXML's parse_chunk (as opposed to parse_xml_chunk/parse_balanced_chunk, which is what XML::LibXML::SAX itself uses). different function, different girlies, iykyk.
and its whole purpose? it simply keeps parsing possibly incomplete XML fragments. like when you're reading from a socket and the XML is just arriving in dribs and drabs, being all mysterious and half-finished π this module handles that. it does not freak out. it does not need the whole thing at once. it's giving patient main character energy.
π¦ METHODS π¦
parse_chunk
parses a possibly incomplete XML fragment. feed it whatever you've got, bestie, it'll do its thing β¨
finish
explicitly tells the parser that we're done parsing. like when you finally hit send on a long text message β closure π
π AUTHOR π
Daisuke Maki <daisuke@endeworks.jp> β literal legend, no cap π
π LICENSE π
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
See http://www.perl.com/perl/misc/Artistic.html
fr fr, the license details matter, so don't skip 'em. same terms as Perl itself, and that link is right there if you want the full Art of it π
okay that's the whole page!! this beauty shipped with perl v5.42.2, dated 2026-02-15 β mwah, slay, periodt βππ
π¦ where this page comes from
- alpine 3.24: perl-xml-libxml-sax-chunkparser-doc 0.00008-r1 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms