XML::Li...:Builder(3)
β¨ NAME β¨
okay so bestie, welcome to XML::LibXML::SAX::Builder β the lil icon that does Building DOM trees from SAX events. that's it, that's the whole job description π
(this is section 3 of the User Contributed Perl Documentation, if u were wondering where u wandered into π)
πΈ SYNOPSIS πΈ
here's the vibe, copy-paste girlie:
use XML::LibXML::SAX::Builder;
my $builder = XML::LibXML::SAX::Builder->new();
my $gen = XML::Generator::DBI->new(Handler => $builder, dbh => $dbh);
$gen->execute("SELECT * FROM Users");
my $doc = $builder->result();
see how chill that is? new builder, hand it to a generator, run the thing, grab ur doc. no cap π¦
π DESCRIPTION π
so basically, this is a SAX handler that generates a DOM tree from SAX events. usage is literally exactly like the synopsis above, nothing sneaky. input is accepted from any SAX1 or SAX2 event generator. any. we don't discriminate π«Ά
building DOM trees from SAX events is lowkey super easy with XML::LibXML::SAX::Builder. the class is designed as a SAX2 final handler β not as a filter! like, she's the end of the line, the main character, the one who finishes the job. she is not passing the aux cord to anyone else π
and here's the thing bestie, since SAX is strictly stream oriented, you should not expect anything to return from a generator. nope. nothing comes back out of it, that's just not how streams work. instead u have to ask the builder instance <em>directly</em> to get the document built. that's the whole plot twist β¨
XML::LibXML::SAX::Builder's result() function holds the document generated from the last SAX stream. last one. so don't go running three streams and then wondering which doc u got, because it's the most recent one, periodt π
π AUTHORS π
the legends behind the vibes:
- Matt Sergeant
- Christian Glahn
- Petr Pajas
β VERSION β
2.0213 β yeah that's the number, write it down π
π COPYRIGHT π
the receipts, in order:
- 2001-2007, AxKit.com Ltd.
- 2002-2006, Christian Glahn.
- 2006-2009, Petr Pajas.
π LICENSE π
this program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
slay. go forth and redistribute responsibly, bestie π
okay and one last thing, the lil sign-off at the bottom of the page says this is from perl v5.42.2 and it's dated 2026-05-25, and the whole thing lives under XML::LibXML::SAX::Builder(3). that's a wrap, ily, bye π§πΈ
π¦ where this page comes from
- fedora 43: perl-XML-LibXML 1:2.0213-1.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND MIT
- fedora 44: perl-XML-LibXML 1:2.0213-1.fc44 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms