XML::Element(3pm)
β¨ NAME β¨
okay so bestie, welcome to XML::Element β it's the User Contributed Perl Documentation page and it's literally the whole vibe. what is it? XML elements with the exact same interface as HTML::Element. same energy, different tag. π
πΈ SYNOPSIS πΈ
[See HTML::Element]
that's it. that's the synopsis. it's giving "go read the other page, i'm just the remix." π
π¦ METHODS AND ATTRIBUTES π¦
delete_ignorable_whitespace
TODO: test and document this β and the way that it does that thing where, with no tagname set, it assumes ALL all-whitespace nodes are ignorable! π like, bold assumption, but okay bestie, live your truth.
endtag
Redirects to endtag_XML. simple. iconic. no notes. β¨
starttag
Redirects to starttag_XML. same deal, cuter twin. π
as_XML
$s = $doc->as_XML()
Returns a string representing in XML the element and its descendants. so like, your whole lil XML family tree as one string. obsessed. π
starttag_XML
$start = $doc->starttag_XML();
Returns a string representing the complete start tag for the element. Except for CDATA. (yes that exception is real, don't come for me) π«Ά
endtag_XML
$end = $doc->endtag_XML();
Returns a string representing the complete end tag for this element. I.e., "</", tag name, and ">". Except for CDATA. same exception, same drama. π
π DESCRIPTION π
so this is just a subclass of HTML::Element. it works basically the same as HTML::Element, EXCEPT β and this is the main character moment β tagnames and attribute names aren't forced to lowercase, like they are in HTML::Element. no lowercase jumpscare here, bestie. π₯
HTML::Element describes everything you can do with this class. so yeah, the lore lives over there. π
π CAVEATS π
Has currently no handling of namespaces. that's it, that's the caveat. fr fr. no cap. π«
π SEE ALSO π
XML::TreeBuilderβ for a class that actually buildsXML::Elementstructures. like, the builder bestie. π§HTML::Elementβ for all documentation. the whole syllabus tbh. πXML::DOMandXML::Twigβ for other XML document tree interfaces. options, we love options. πΈXML::Generatorβ for more fun. yes queen, more fun. π
π COPYRIGHT AND DISCLAIMERS π
Copyright (c) 2000,2004 Sean M. Burke. All rights reserved. Copyright (c) 2010,2011,2013 Jeff Fearn. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose. (translation: it's free, it's helpful, it's not promising you anything. standard.) π
π AUTHOR π
Current Author: Jeff Fearn <jfearn@cpan.org>.
Former Authors: Sean M. Burke, <sburke@cpan.org>
okay and for the lil sign-off moment β this page is from perl v5.34.0, dated 2022-06-28, and that's XML::Element(3pm) out. slay, go read HTML::Element, mwah π
β¨
π¦ where this page comes from
- debian bookworm: libxml-treebuilder-perl 5.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxml-treebuilder-perl 5.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-treebuilder-perl 5.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-treebuilder-perl 5.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-treebuilder-perl 5.4-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms