{
    "content": [
        {
            "type": "text",
            "text": "# XML::LibXML::NodeList (perldoc)\n\n## NAME\n\nXML::LibXML::NodeList - a list of XML document nodes\n\n## SYNOPSIS\n\nmy $results = $dom->findnodes('//somepath');\nforeach my $context ($results->getnodelist) {\nmy $newresults = $context->findnodes('./other/element');\n...\n}\n\n## DESCRIPTION\n\nAn XML::LibXML::NodeList object contains an ordered list of nodes, as detailed by the W3C DOM\ndocumentation of Node Lists.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n- **SYNOPSIS**\n- **API**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::LibXML::NodeList",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::LibXML::NodeList - a list of XML document nodes",
        "synopsis": "my $results = $dom->findnodes('//somepath');\nforeach my $context ($results->getnodelist) {\nmy $newresults = $context->findnodes('./other/element');\n...\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "API",
                "lines": 71,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::LibXML::NodeList - a list of XML document nodes\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "An XML::LibXML::NodeList object contains an ordered list of nodes, as detailed by the W3C DOM\ndocumentation of Node Lists.\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "my $results = $dom->findnodes('//somepath');\nforeach my $context ($results->getnodelist) {\nmy $newresults = $context->findnodes('./other/element');\n...\n}\n",
                "subsections": []
            },
            "API": {
                "content": "new(@nodes)\nYou will almost never have to create a new NodeList object, as it is all done for you by XPath.\n\ngetnodelist()\nReturns a list of nodes, the contents of the node list, as a perl list.\n\nstringvalue()\nReturns the string-value of the first node in the list. See the XPath specification for what\n\"string-value\" means.\n\ntoliteral()\nReturns the concatenation of all the string-values of all the nodes in the list.\n\ntoliteraldelimited($separator)\nReturns the concatenation of all the string-values of all the nodes in the list, delimited by\nthe specified separator.\n\ntoliterallist()\nReturns all the string-values of all the nodes in the list as a perl list.\n\ngetnode($pos)\nReturns the node at $pos. The node position in XPath is based at 1, not 0.\n\nsize()\nReturns the number of nodes in the NodeList.\n\npop()\nEquivalent to perl's pop function.\n\npush(@nodes)\nEquivalent to perl's push function.\n\nappend($nodelist)\nGiven a nodelist, appends the list of nodes in $nodelist to the end of the current list.\n\nshift()\nEquivalent to perl's shift function.\n\nunshift(@nodes)\nEquivalent to perl's unshift function.\n\nprepend($nodelist)\nGiven a nodelist, prepends the list of nodes in $nodelist to the front of the current list.\n\nmap($coderef)\nEquivalent to perl's map function.\n\ngrep($coderef)\nEquivalent to perl's grep function.\n\nsort($coderef)\nEquivalent to perl's sort function.\n\nCaveat: Perl's magic $a and $b variables are not available in $coderef. Instead the two terms\nare passed to the coderef as arguments.\n\nreverse()\nEquivalent to perl's reverse function.\n\nforeach($coderef)\nInspired by perl's foreach loop. Executes the coderef on each item in the list. Similar to\n\"map\", but instead of returning the list of values returned by $coderef, returns the original\nNodeList.\n\nreduce($coderef, $init)\nEquivalent to List::Util's reduce function. $init is optional and provides an initial value for\nthe reduction.\n\nCaveat: Perl's magic $a and $b variables are not available in $coderef. Instead the two terms\nare passed to the coderef as arguments.\n",
                "subsections": []
            }
        }
    }
}