XML::Grove::IDs(3pm)
π XML::Grove::IDs π
okay bestie so this is the User Contributed Perl Documentation page for XML::Grove::IDs, and it's literally just a little indexer that goes "which of these elements has an id and what's it called" π
β¨ NAME β¨
XML::Grove::IDs β return an index of id attributes in a grove π¦
πΈ SYNOPSIS πΈ
use XML::Grove::IDs;
# Using get_ids method on XML::Grove::Document or XML::Grove::Element:
$hash = $grove_object->get_ids($attr_name, $elements);
# Using an XML::Grove::IDs instance:
$indexer = XML::Grove::IDs->new($attr_name, $elements);
my $hash = {};
$grove_object->accept($indexer, $hash);
π DESCRIPTION π
XML::Grove::IDs returns a hash index of all nodes in a grove with an id attribute. no cap, that's the whole job π
The keys of the hash are the ID attribute value, and the value at that key is the element. slay.
$attr_name and $elements are both optional β they're giving very "only if you want" energy.
$attr_namedefaults to"id"if you don't supply it. so if you say nothing, it's looking forid. periodt.- Indexing can be restricted to only certain elements, by name, by providing a hash containing
NAME=>1values. so like a lil guest list for which elements get to be in the index π
π«Ά AUTHOR π«Ά
Ken MacLeod, ken@bitsko.slc.ut.us
π SEE ALSO π
perl(1)XML::Grove(3)Data::Grove::Visitor(3)- Extensible Markup Language (XML)
http://www.w3c.org/XML
not me being obsessed with how simple this module is π it just wants to know your ids, bestie. let it in.
and that's the vibe check β this page is from perl v5.36.0, dated 2022-11-29, filed under XML::Grove::IDs(3pm). mwah π stay iconic β¨
π¦ where this page comes from
- debian bookworm: libxml-grove-perl 0.46alpha-14 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libxml-grove-perl 0.46alpha-14 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libxml-grove-perl 0.46alpha-14 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libxml-grove-perl 0.46alpha-14 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libxml-grove-perl 0.46alpha-14 Β· 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