{
    "content": [
        {
            "type": "text",
            "text": "# XML::DOM::Parser (perldoc)\n\n## NAME\n\nXML::DOM::Parser - An XML::Parser that builds XML::DOM document structures\n\n## SYNOPSIS\n\nuse XML::DOM;\nmy $parser = new XML::DOM::Parser;\nmy $doc = $parser->parsefile (\"file.xml\");\n$doc->dispose; # Avoid memory leaks - cleanup circular references\n\n## DESCRIPTION\n\nXML::DOM::Parser extends XML::Parser\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **Using LWP to parse URLs**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::DOM::Parser",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::DOM::Parser - An XML::Parser that builds XML::DOM document structures",
        "synopsis": "use XML::DOM;\nmy $parser = new XML::DOM::Parser;\nmy $doc = $parser->parsefile (\"file.xml\");\n$doc->dispose; # Avoid memory leaks - cleanup circular references",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "Using LWP to parse URLs",
                "lines": 24,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::DOM::Parser - An XML::Parser that builds XML::DOM document structures\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::DOM;\n\nmy $parser = new XML::DOM::Parser;\nmy $doc = $parser->parsefile (\"file.xml\");\n$doc->dispose; # Avoid memory leaks - cleanup circular references\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "XML::DOM::Parser extends XML::Parser\n\nThe XML::Parser module was written by Clark Cooper and is built on top of XML::Parser::Expat,\nwhich is a lower level interface to James Clark's expat library.\n\nXML::DOM::Parser parses XML strings or files and builds a data structure that conforms to the\nAPI of the Document Object Model as described at <http://www.w3.org/TR/REC-DOM-Level-1>. See the\nXML::Parser manpage for other additional properties of the XML::DOM::Parser class. Note that the\n'Style' property should not be used (it is set internally.)\n\nThe XML::Parser NoExpand option is more or less supported, in that it will generate\nEntityReference objects whenever an entity reference is encountered in character data. I'm not\nsure how useful this is. Any comments are welcome.\n\nAs described in the synopsis, when you create an XML::DOM::Parser object, the parse and\nparsefile methods create an XML::DOM::Document object from the specified input. This Document\nobject can then be examined, modified and written back out to a file or converted to a string.\n\nWhen using XML::DOM with XML::Parser version 2.19 and up, setting the XML::DOM::Parser option\nKeepCDATA to 1 will store CDATASections in CDATASection nodes, instead of converting them to\nText nodes. Subsequent CDATASection nodes will be merged into one. Let me know if this is a\nproblem.\n",
                "subsections": []
            },
            "Using LWP to parse URLs": {
                "content": "The parsefile() method now also supports URLs, e.g. *http://www.erols.com/enno/xsa.xml*. It uses\nLWP to download the file and then calls parse() on the resulting string. By default it will use\na LWP::UserAgent that is created as follows:\n\nuse LWP::UserAgent;\n$LWPUSERAGENT = LWP::UserAgent->new;\n$LWPUSERAGENT->envproxy;\n\nNote that envproxy reads proxy settings from environment variables, which is what I need to do\nto get thru our firewall. If you want to use a different LWP::UserAgent, you can either set it\nglobally with:\n\nXML::DOM::Parser::setLWPUserAgent ($myagent);\n\nor, you can specify it for a specific XML::DOM::Parser by passing it to the constructor:\n\nmy $parser = new XML::DOM::Parser (LWPUserAgent => $myagent);\n\nCurrently, LWP is used when the filename (passed to parsefile) starts with one of the following\nURL schemes: http, https, ftp, wais, gopher, or file (followed by a colon.) If I missed one,\nplease let me know.\n\nThe LWP modules are part of libwww-perl which is available at CPAN.\n",
                "subsections": []
            }
        }
    }
}