XML::Grove::IDs(3pm)

XML::Grove::IDs3pm

Return an index of `id' attributes in a grove

Usage

 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);

Overview

"XML::Grove::IDs" returns a hash index of all nodes in a grove with an `id' attribute. The keys of the hash are the ID attribute value and the value at that key is the element. `$attr_name' and `$elements' are optional. The attribute name defaults to `"id"' if `$attr_name' is not supplied. Indexing can be restricted to only certain elements, by name, by providing a hash containing NAME=>1 values.

Releases

13 releases since Debian 2.2 (Potato); the text changed 6 times.

  1. 2.2
  2. 3.0
  3. 3.1–5.0
  4. 6.0–9
  5. 10
  6. 11
  7. 12–13

Author

Ken MacLeod, [email protected]

From libxml-grove-perl 0.46alpha-14 in Debian 13 (Trixie). Parsed by carta from the page's man source.