{
    "content": [
        {
            "type": "text",
            "text": "# XML::DOM::DocumentType (info)\n\n## NAME\n\nXML::DOM::DocumentType - An XML document type (DTD) in XML::DOM\n\n## DESCRIPTION\n\nXML::DOM::DocumentType 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::DocumentType",
        "section": "",
        "mode": "info",
        "summary": "XML::DOM::DocumentType - An XML document type (DTD) 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": 157,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::DOM::DocumentType - An XML document type (DTD) in XML::DOM\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "XML::DOM::DocumentType extends XML::DOM::Node.\n\nEach Document has a doctype attribute whose value is either null or a\nDocumentType object. The DocumentType interface in the DOM Level 1 Core\nprovides an interface to the list of entities that are defined for the\ndocument, and little else because the effect of namespaces and the\nvarious XML scheme efforts on DTD representation are not clearly\nunderstood as of this writing.  The DOM Level 1 doesn't support editing\nDocumentType nodes.\n\nNot In DOM Spec: This implementation has added a lot of extra\nfunctionality to the DOM Level 1 interface.  To allow editing of the\nDocumentType nodes, see XML::DOM::ignoreReadOnly.\n\nMETHODS\ngetName\nReturns the name of the DTD, i.e. the name immediately following\nthe DOCTYPE keyword.\n\ngetEntities\nA NamedNodeMap containing the general entities, both external and\ninternal, declared in the DTD. Duplicates are discarded.  For\nexample in:\n\n<!DOCTYPE ex SYSTEM \"ex.dtd\" [\n<!ENTITY foo \"foo\">\n<!ENTITY bar \"bar\">\n<!ENTITY % baz \"baz\">\n]>\n<ex/>\n\nthe interface provides access to foo and bar but not baz.  Every\nnode in this map also implements the Entity interface.\n\nThe DOM Level 1 does not support editing entities, therefore\nentities cannot be altered in any way.\n\nNot In DOM Spec: See XML::DOM::ignoreReadOnly to edit the\nDocumentType etc.\n\ngetNotations\nA NamedNodeMap containing the notations declared in the DTD.\nDuplicates are discarded. Every node in this map also implements\nthe Notation interface.\n\nThe DOM Level 1 does not support editing notations, therefore\nnotations cannot be altered in any way.\n\nNot In DOM Spec: See XML::DOM::ignoreReadOnly to edit the\nDocumentType etc.\n\nAdditional methods not in the DOM Spec\nCreating and setting the DocumentType\nA new DocumentType can be created with:\n\n$doctype = $doc->createDocumentType ($name, $sysId, $pubId, $internal);\n\nTo set (or replace) the DocumentType for a particular document,\nuse:\n\n$doc->setDocType ($doctype);\n\ngetSysId and setSysId (sysId)\nReturns or sets the system id.\n\ngetPubId and setPubId (pudId)\nReturns or sets the public id.\n\nsetName (name)\nSets the name of the DTD, i.e. the name immediately following the\nDOCTYPE keyword. Note that this should always be the same as the\nelement tag name of the root element.\n\ngetAttlistDecl (elemName)\nReturns the AttlistDecl for the Element with the specified name, or\nundef.\n\ngetElementDecl (elemName)\nReturns the ElementDecl for the Element with the specified name, or\nundef.\n\ngetEntity (entityName)\nReturns the Entity with the specified name, or undef.\n\naddAttlistDecl (elemName)\nAdds a new AttDecl node with the specified elemName if one doesn't\nexist yet.  Returns the AttlistDecl (new or existing) node.\n\naddElementDecl (elemName, model)\nAdds a new ElementDecl node with the specified elemName and model\nif one doesn't exist yet.  Returns the AttlistDecl (new or\nexisting) node. The model is ignored if one already existed.\n\naddEntity (notationName, value, sysId, pubId, ndata, parameter)\nAdds a new Entity node. Don't use createEntity and appendChild,\nbecause it should be added to the internal NamedNodeMap containing\nthe entities.\n\nParameters:\nnotationName the entity name.\nvalue        the entity value.\nsysId        the system id (if any.)\npubId        the public id (if any.)\nndata        the NDATA declaration (if any, for general unparsed\nentities.)\nparameter      whether it is a parameter entity (%ent;) or not\n(&ent;).\n\nSysId, pubId and ndata may be undefined.\n\nDOMExceptions:\n\no   INVALIDCHARACTERERR\n\nRaised if the notationName does not conform to the XML spec.\n\naddNotation (name, base, sysId, pubId)\nAdds a new Notation object.\n\nParameters:\nname   the notation name.\nbase   the base to be used for resolving a relative URI.\nsysId  the system id.\npubId  the public id.\n\nBase, sysId, and pubId may all be undefined.  (These parameters are\npassed by the XML::Parser Notation handler.)\n\nDOMExceptions:\n\no   INVALIDCHARACTERERR\n\nRaised if the notationName does not conform to the XML spec.\n\naddAttDef (elemName, attrName, type, default, fixed)\nAdds a new attribute definition. It will add the AttDef node to the\nAttlistDecl if it exists. If an AttDef with the specified attrName\nalready exists for the given elemName, this function only generates\na warning.\n\nSee XML::DOM::AttDef::new for the other parameters.\n\ngetDefaultAttrValue (elem, attr)\nReturns the default attribute value as a string or undef, if none\nis available.\n\nParameters:\nelem    The element tagName.\nattr    The attribute name.\n\nexpandEntity (entity [, parameter])\nExpands the specified entity or parameter entity (if parameter=1)\nand returns its value as a string, or undef if the entity does not\nexist.  (The entity name should not contain the '%', '&' or ';'\ndelimiters.)\n\nperl v5.30.0                      2019-11-24       XML::DOM::DocumentType(3pm)",
                "subsections": []
            }
        }
    }
}