{
    "content": [
        {
            "type": "text",
            "text": "# XML::DOM::NamedNodeMap (perldoc)\n\n## NAME\n\nXML::DOM::NamedNodeMap - A hash table interface for XML::DOM\n\n## DESCRIPTION\n\nObjects implementing the NamedNodeMap interface are used to represent collections of nodes that\ncan be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps\nare not maintained in any particular order. Objects contained in an object implementing\nNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient\nenumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an\norder to these Nodes.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::DOM::NamedNodeMap",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::DOM::NamedNodeMap - A hash table interface for XML::DOM",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 70,
                "subsections": [
                    {
                        "name": "Additional methods not in the DOM Spec",
                        "lines": 19
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::DOM::NamedNodeMap - A hash table interface for XML::DOM\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "Objects implementing the NamedNodeMap interface are used to represent collections of nodes that\ncan be accessed by name. Note that NamedNodeMap does not inherit from NodeList; NamedNodeMaps\nare not maintained in any particular order. Objects contained in an object implementing\nNamedNodeMap may also be accessed by an ordinal index, but this is simply to allow convenient\nenumeration of the contents of a NamedNodeMap, and does not imply that the DOM specifies an\norder to these Nodes.\n\nNote that in this implementation, the objects added to a NamedNodeMap are kept in order.\n\nMETHODS\ngetNamedItem (name)\nRetrieves a node specified by name.\n\nReturn Value: A Node (of any type) with the specified name, or undef if the specified name\ndid not identify any node in the map.\n\nsetNamedItem (arg)\nAdds a node using its nodeName attribute.\n\nAs the nodeName attribute is used to derive the name which the node must be stored under,\nmultiple nodes of certain types (those that have a \"special\" string value) cannot be stored\nas the names would clash. This is seen as preferable to allowing nodes to be aliased.\n\nParameters: *arg* A node to store in a named node map.\n\nThe node will later be accessible using the value of the nodeName attribute of the node. If\na node with that name is already present in the map, it is replaced by the new one.\n\nReturn Value: If the new Node replaces an existing node with the same name the previously\nexisting Node is returned, otherwise undef is returned.\n\nDOMExceptions:\n\n*   WRONGDOCUMENTERR\n\nRaised if arg was created from a different document than the one that created the\nNamedNodeMap.\n\n*   NOMODIFICATIONALLOWEDERR\n\nRaised if this NamedNodeMap is readonly.\n\n*   INUSEATTRIBUTEERR\n\nRaised if arg is an Attr that is already an attribute of another Element object. The DOM\nuser must explicitly clone Attr nodes to re-use them in other elements.\n\nremoveNamedItem (name)\nRemoves a node specified by name. If the removed node is an Attr with a default value it is\nimmediately replaced.\n\nReturn Value: The node removed from the map or undef if no node with such a name exists.\n\nDOMException:\n\n*   NOTFOUNDERR\n\nRaised if there is no node named name in the map.\n\nitem (index)\nReturns the indexth item in the map. If index is greater than or equal to the number of\nnodes in the map, this returns undef.\n\nReturn Value: The node at the indexth position in the NamedNodeMap, or undef if that is not\na valid index.\n\ngetLength\nReturns the number of nodes in the map. The range of valid child node indices is 0 to\nlength-1 inclusive.\n",
                "subsections": [
                    {
                        "name": "Additional methods not in the DOM Spec",
                        "content": "getValues\nReturns a NodeList with the nodes contained in the NamedNodeMap. The NodeList is \"live\", in\nthat it reflects changes made to the NamedNodeMap.\n\nWhen this method is called in a list context, it returns a regular perl list containing the\nvalues. Note that this list is not \"live\". E.g.\n\n@list = $map->getValues;        # returns a perl list\n$nodelist = $map->getValues;    # returns a NodeList (object ref.)\nfor my $val ($map->getValues)   # iterate over the values\n\ngetChildIndex (node)\nReturns the index of the node in the NodeList as returned by getValues, or -1 if the node is\nnot in the NamedNodeMap.\n\ndispose\nRemoves all circular references in this NamedNodeMap and its descendants so the objects can\nbe claimed for garbage collection. The objects should not be used afterwards.\n"
                    }
                ]
            }
        }
    }
}