XML::Li...enerator(3)
π XML::LibXML::SAX::Generator π
okay bestie, so this is a page from the User Contributed Perl Documentation (manual section 3, the library-calls girlies π«Ά). Pull up a chair, grab a boba, we're doing SAX today.
β¨ NAME β¨
XML::LibXML::SAX::Generator β generate SAX events from a LibXML tree. it's giving translator energy fr fr π
β¨ SYNOPSIS β¨
my $handler = MySAXHandler->new();
my $generator = XML::LibXML::SAX::Generator->new(Handler => $handler);
my $dom = XML::LibXML->new->parse_file("foo.xml");
$generator->generate($dom);
look at that. four lines. gorgeous. iconic. no notes. π
β¨ DESCRIPTION β¨
π¨ THIS CLASS IS DEPRECATED! Use XML::LibXML::SAX::Parser instead! π¨
not me having to be the one to tell you this π but yeah, this class is deprecated, capital D, and the glow-up replacement is XML::LibXML::SAX::Parser. use that one, bestie, i'm begging.
so like, what even was this? okay so this little helper class lets you generate SAX events from any XML::LibXML node β and yes, all of its sub-nodes too, the whole family tree, we're not leaving anyone out π. what that buys you is basically interop: it takes your XML::LibXML situation and hands it over to other modules that may implement SAX. matchmaker behaviour, honestly π¦
it uses SAX2 style, but it should still be compatible with anything SAX1, by use of stringification overloading. so like, lowkey flexible, highkey vintage-friendly β¨
and that's... kind of it? there is genuinely nothing to really know about this beyond the synopsis up there π, plus a general knowledge of how to use SAX β and teaching you SAX is beyond the scope here, sorry pookie, that's a different manual page πΈ
so yeah, that's the whole vibe. deprecated but still serving, SAX2 but SAX1-friendly, interop queen π
this page came to you courtesy of perl v5.42.2, dated 2026-05-25, from the User Contributed Perl Documentation section 3. stay hydrated, read your SEE ALSOs, and use XML::LibXML::SAX::Parser instead π
π
π¦ 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