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