{
    "content": [
        {
            "type": "text",
            "text": "# XML::LibXML::AttributeHash (perldoc)\n\n## NAME\n\nXML::LibXML::AttributeHash - tie an XML::LibXML::Element to a hash to access its attributes\n\n## SYNOPSIS\n\ntie my %hash, 'XML::LibXML::AttributeHash', $element;\n$hash{'href'} = 'http://example.com/';\nprint $element->getAttribute('href') . \"\\n\";\n\n## DESCRIPTION\n\nThis class allows an element's attributes to be accessed as if they were a plain old Perl hash.\nAttribute names become hash keys. Namespaced attributes are keyed using Clark notation.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::LibXML::AttributeHash",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::LibXML::AttributeHash - tie an XML::LibXML::Element to a hash to access its attributes",
        "synopsis": "tie my %hash, 'XML::LibXML::AttributeHash', $element;\n$hash{'href'} = 'http://example.com/';\nprint $element->getAttribute('href') . \"\\n\";",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 24,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::LibXML::AttributeHash - tie an XML::LibXML::Element to a hash to access its attributes\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "tie my %hash, 'XML::LibXML::AttributeHash', $element;\n$hash{'href'} = 'http://example.com/';\nprint $element->getAttribute('href') . \"\\n\";\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This class allows an element's attributes to be accessed as if they were a plain old Perl hash.\nAttribute names become hash keys. Namespaced attributes are keyed using Clark notation.\n\nmy $XLINK = 'http://www.w3.org/1999/xlink';\ntie my %hash, 'XML::LibXML::AttributeHash', $element;\n$hash{\"{$XLINK}href\"} = 'http://localhost/';\nprint $element->getAttributeNS($XLINK, 'href') . \"\\n\";\n\nThere is rarely any need to use XML::LibXML::AttributeHash directly. In general, it is possible\nto take advantage of XML::LibXML::Element's overloading. The example in the SYNOPSIS could have\nbeen written:\n\n$element->{'href'} = 'http://example.com/';\nprint $element->getAttribute('href') . \"\\n\";\n\nThe tie interface allows the passing of additional arguments to XML::LibXML::AttributeHash:\n\ntie my %hash, 'XML::LibXML::AttributeHash', $element, %args;\n\nCurrently only one argument is supported, the boolean \"weaken\" which (if true) indicates that\nthe tied object's reference to the element should be a weak reference. This is used by\nXML::LibXML::Element's overloading. The \"weaken\" argument is ignored if you don't have a working\nScalar::Util::weaken.\n",
                "subsections": []
            }
        }
    }
}