{
    "content": [
        {
            "type": "text",
            "text": "# XML::LibXML::Attr (perldoc)\n\n**Summary:** XML::LibXML::Attr - XML::LibXML Attribute Class\n\n**Synopsis:** use XML::LibXML;\n# Only methods specific to Attribute nodes are listed here,\n# see the XML::LibXML::Node manpage for other methods\n$attr = XML::LibXML::Attr->new($name [,$value]);\n$string = $attr->getValue();\n$string = $attr->value;\n$attr->setValue( $string );\n$node = $attr->getOwnerElement();\n$attr->setNamespace($nsURI, $prefix);\n$bool = $attr->isId;\n$string = $attr->serializeContent;\n\n## Section Outline\n\n- **NAME** (2 lines)\n- **SYNOPSIS** (13 lines)\n- **DESCRIPTION** (3 lines)\n- **METHODS** (77 lines)\n- **AUTHORS** (2 lines)\n- **VERSION** (2 lines)\n- **COPYRIGHT** (6 lines)\n- **LICENSE** (3 lines)\n\n## Full Content\n\n### NAME\n\nXML::LibXML::Attr - XML::LibXML Attribute Class\n\n### SYNOPSIS\n\nuse XML::LibXML;\n# Only methods specific to Attribute nodes are listed here,\n# see the XML::LibXML::Node manpage for other methods\n\n$attr = XML::LibXML::Attr->new($name [,$value]);\n$string = $attr->getValue();\n$string = $attr->value;\n$attr->setValue( $string );\n$node = $attr->getOwnerElement();\n$attr->setNamespace($nsURI, $prefix);\n$bool = $attr->isId;\n$string = $attr->serializeContent;\n\n### DESCRIPTION\n\nThis is the interface to handle Attributes like ordinary nodes. The\nnaming of the class relies on the W3C DOM documentation.\n\n### METHODS\n\nThe class inherits from XML::LibXML::Node. The documentation for\nInherited methods is not listed here.\n\nMany functions listed here are extensively documented in the DOM Level 3\nspecification (<http://www.w3.org/TR/DOM-Level-3-Core/>). Please refer\nto the specification for extensive documentation.\n\nnew\n$attr = XML::LibXML::Attr->new($name [,$value]);\n\nClass constructor. If you need to work with ISO encoded strings, you\nshould *always* use the \"createAttribute\" of XML::LibXML::Document.\n\ngetValue\n$string = $attr->getValue();\n\nReturns the value stored for the attribute. If undef is returned,\nthe attribute has no value, which is different of being \"not\nspecified\".\n\nvalue\n$string = $attr->value;\n\nAlias for *getValue()*\n\nsetValue\n$attr->setValue( $string );\n\nThis is needed to set a new attribute value. If ISO encoded strings\nare passed as parameter, the node has to be bound to a document,\notherwise the encoding might be done incorrectly.\n\ngetOwnerElement\n$node = $attr->getOwnerElement();\n\nreturns the node the attribute belongs to. If the attribute is not\nbound to a node, undef will be returned. Overwriting the underlying\nimplementation, the *parentNode* function will return undef, instead\nof the owner element.\n\nsetNamespace\n$attr->setNamespace($nsURI, $prefix);\n\nThis function tries to bound the attribute to a given namespace. If\n$nsURI is undefined or empty, the function discards any previous\nassociation of the attribute with a namespace. If the namespace was\nnot previously declared in the context of the attribute, this\nfunction will fail. In this case you may wish to call setNamespace()\non the ownerElement. If the namespace URI is non-empty and declared\nin the context of the attribute, but only with a different\n(non-empty) prefix, then the attribute is still bound to the\nnamespace but gets a different prefix than $prefix. The function\nalso fails if the prefix is empty but the namespace URI is not\n(because unprefixed attributes should by definition belong to no\nnamespace). This function returns 1 on success, 0 otherwise.\n\nisId\n$bool = $attr->isId;\n\nDetermine whether an attribute is of type ID. For documents with a\nDTD, this information is only available if DTD loading/validation\nhas been requested. For HTML documents parsed with the HTML parser\nID detection is done automatically. In XML documents, all \"xml:id\"\nattributes are considered to be of type ID.\n\nserializeContent($docencoding)\n$string = $attr->serializeContent;\n\nThis function is not part of DOM API. It returns attribute content\nin the form in which it serializes into XML, that is with all\nmeta-characters properly quoted and with raw entity references\n(except for entities expanded during parse time). Setting the\noptional $docencoding flag to 1 enforces document encoding for the\noutput string (which is then passed to Perl as a byte string).\nOtherwise the string is passed to Perl as (UTF-8 encoded)\ncharacters.\n\n### AUTHORS\n\nMatt Sergeant, Christian Glahn, Petr Pajas\n\n### VERSION\n\n2.0134\n\n### COPYRIGHT\n\n2001-2007, AxKit.com Ltd.\n\n2002-2006, Christian Glahn.\n\n2006-2009, Petr Pajas.\n\n### LICENSE\n\nThis program is free software; you can redistribute it and/or modify it\nunder the same terms as Perl itself.\n\n"
        }
    ],
    "structuredContent": {
        "command": "XML::LibXML::Attr",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::LibXML::Attr - XML::LibXML Attribute Class",
        "synopsis": "use XML::LibXML;\n# Only methods specific to Attribute nodes are listed here,\n# see the XML::LibXML::Node manpage for other methods\n$attr = XML::LibXML::Attr->new($name [,$value]);\n$string = $attr->getValue();\n$string = $attr->value;\n$attr->setValue( $string );\n$node = $attr->getOwnerElement();\n$attr->setNamespace($nsURI, $prefix);\n$bool = $attr->isId;\n$string = $attr->serializeContent;",
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 13,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "METHODS",
                "lines": 77,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "COPYRIGHT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "LICENSE",
                "lines": 3,
                "subsections": []
            }
        ]
    }
}