{
    "content": [
        {
            "type": "text",
            "text": "# XML::DOM::Attr (perldoc)\n\n## NAME\n\nXML::DOM::Attr - An XML attribute in XML::DOM\n\n## DESCRIPTION\n\nXML::DOM::Attr extends XML::DOM::Node.\n\n## Sections\n\n- **NAME**\n- **DESCRIPTION**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::DOM::Attr",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::DOM::Attr - An XML attribute in 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": 44,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::DOM::Attr - An XML attribute in XML::DOM\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "XML::DOM::Attr extends XML::DOM::Node.\n\nThe Attr nodes built by the XML::DOM::Parser always have one child node which is a Text node\ncontaining the expanded string value (i.e. EntityReferences are always expanded.)\nEntityReferences may be added when modifying or creating a new Document.\n\nThe Attr interface represents an attribute in an Element object. Typically the allowable values\nfor the attribute are defined in a document type definition.\n\nAttr objects inherit the Node interface, but since they are not actually child nodes of the\nelement they describe, the DOM does not consider them part of the document tree. Thus, the Node\nattributes parentNode, previousSibling, and nextSibling have a undef value for Attr objects. The\nDOM takes the view that attributes are properties of elements rather than having a separate\nidentity from the elements they are associated with; this should make it more efficient to\nimplement such features as default attributes associated with all elements of a given type.\nFurthermore, Attr nodes may not be immediate children of a DocumentFragment. However, they can\nbe associated with Element nodes contained within a DocumentFragment. In short, users and\nimplementors of the DOM need to be aware that Attr nodes have some things in common with other\nobjects inheriting the Node interface, but they also are quite distinct.\n\nThe attribute's effective value is determined as follows: if this attribute has been explicitly\nassigned any value, that value is the attribute's effective value; otherwise, if there is a\ndeclaration for this attribute, and that declaration includes a default value, then that default\nvalue is the attribute's effective value; otherwise, the attribute does not exist on this\nelement in the structure model until it has been explicitly added. Note that the nodeValue\nattribute on the Attr instance can also be used to retrieve the string version of the\nattribute's value(s).\n\nIn XML, where the value of an attribute can contain entity references, the child nodes of the\nAttr node provide a representation in which entity references are not expanded. These child\nnodes may be either Text or EntityReference nodes. Because the attribute type may be unknown,\nthere are no tokenized attribute values.\n\nMETHODS\ngetValue\nOn retrieval, the value of the attribute is returned as a string. Character and general\nentity references are replaced with their values.\n\nsetValue (str)\nDOM Spec: On setting, this creates a Text node with the unparsed contents of the string.\n\ngetName\nReturns the name of this attribute.\n",
                "subsections": []
            }
        }
    }
}