XML::Ha...uildDOM(3)
π NAME π
okay so this page is XML::Ha...uildDOM(3) from the User Contributed Perl Documentation, and it's all about XML::Handler::BuildDOM π
. The whole one-line summary is: it's a PerlSAX handler that creates XML::DOM document structures β main character energy for your XML tree, no cap β¨.
β¨ SYNOPSIS β¨
use XML::Handler::BuildDOM;
use XML::Parser::PerlSAX;
my $handler = new XML::Handler::BuildDOM (KeepCDATA => 1);
my $parser = new XML::Parser::PerlSAX (Handler => $handler);
my $doc = $parser->parsefile ("file.xml");
π¦ DESCRIPTION π¦
XML::Handler::BuildDOM creates XML::DOM document structures β literally XML::DOM::Document objects β from PerlSAX events. It's giving "events in, document out" and honestly? iconic π«Ά.
Also, name lore drop: this class used to be called XML::PerlSAX::DOM prior to libxml-enno 1.0.1 π.
π CONSTRUCTOR OPTIONS π
The XML::Handler::BuildDOM constructor supports the following options, bestie:
KeepCDATA => 1β if you set it to0(which is the default), CDATASections get converted into regular text. So default0means no CDATA special treatment, periodt.Document => $docβ if it's undefined,start_documentwill extract it fromElementorDocType(if set); otherwise it will create a newXML::DOM::Document.Element => $elemβ if it's undefined, it is set toDocument. This is the insertion point (or parent) for the nodes defined by the following callbacks. Basically the spot where the new nodes get tucked in π .DocType => $doctypeβ if it's undefined,start_documentwill extract it fromDocument(if possible). Otherwise it adds a newXML::DOM::DocumentTypeto theDocument.
π okay that's literally the whole page, bestie! source/version: perl v5.42.0 β’ date: 2022-05-23 β’ manual: XML::Ha...uildDOM(3) β bye bestie π«Άβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-XML-DOM 1.46-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms