XML::LibXML::NamedNodeMap(3pm)

XML::LibXML::NamedNodeMap3pm

A map for named nodes

Usage

  use XML::LibXML;
  my $map = XML::LibXML::NamedNodeMap->new(@nodes);
  my $nodes_list = $map->nodes();
  my $node_with_index_2 = $map->item(2);
  my $length = $map->length;
  my $nodes_ref = $node->nodes()
  my $node_2 = $map->item(2);
  my $node = $map->getNamedItem('phone_number');
  $map->setNamedItem($new_node)
  $map->removeNamedItem($name)

Overview

XML::LibXML::NamedNodeMap maps nodes' names to nodes.

Methods

length
  my $length = $map->length;

Returns the number of nodes in the map.

nodes
  my $nodes_ref = $node->nodes()

Returns a reference to the list of nodes.

item
  my $node_2 = $map->item(2);

Returns the node with the index of the argument (starting from 0)

getNamedItem
  my $node = $map->getNamedItem('phone_number');

Returns the node with the name.

setNamedItem
  $map->setNamedItem($new_node)

Sets the node with the same name as $new_node to $new_node.

removeNamedItem
  $map->removeNamedItem($name)

Remove the item with the name $name.

getNamedItemNS

Not implemented yet..

setNamedItemNS

Not implemented yet..

removeNamedItemNS

Not implemented yet..

Version

2.0213

Authors

Matt Sergeant, Christian Glahn, Petr Pajas

License

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

From perl-xml-libxml 2.0213-2 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.