{
    "content": [
        {
            "type": "text",
            "text": "# XML::Parser::Style::Stream (perldoc)\n\n## NAME\n\nXML::Parser::Style::Stream - Stream style for XML::Parser\n\n## SYNOPSIS\n\nuse XML::Parser;\nmy $p = XML::Parser->new(Style => 'Stream', Pkg => 'MySubs');\n$p->parsefile('foo.xml');\n{\npackage MySubs;\nsub StartTag {\nmy ($e, $name) = @;\n# do something with start tags\n}\nsub EndTag {\nmy ($e, $name) = @;\n# do something with end tags\n}\nsub Characters {\nmy ($e, $data) = @;\n# do something with text nodes\n}\n}\n\n## DESCRIPTION\n\nThis style uses the Pkg option to find subs in a given package to call for each event. If none\nof the subs that this style looks for is there, then the effect of parsing with this style is to\nprint a canonical copy of the document without comments or declarations. All the subs receive as\ntheir 1st parameter the Expat instance for the document they're parsing.\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::Parser::Style::Stream",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::Parser::Style::Stream - Stream style for XML::Parser",
        "synopsis": "use XML::Parser;\nmy $p = XML::Parser->new(Style => 'Stream', Pkg => 'MySubs');\n$p->parsefile('foo.xml');\n{\npackage MySubs;\nsub StartTag {\nmy ($e, $name) = @;\n# do something with start tags\n}\nsub EndTag {\nmy ($e, $name) = @;\n# do something with end tags\n}\nsub Characters {\nmy ($e, $data) = @;\n# do something with text nodes\n}\n}",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 23,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 35,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::Parser::Style::Stream - Stream style for XML::Parser\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::Parser;\nmy $p = XML::Parser->new(Style => 'Stream', Pkg => 'MySubs');\n$p->parsefile('foo.xml');\n\n{\npackage MySubs;\n\nsub StartTag {\nmy ($e, $name) = @;\n# do something with start tags\n}\n\nsub EndTag {\nmy ($e, $name) = @;\n# do something with end tags\n}\n\nsub Characters {\nmy ($e, $data) = @;\n# do something with text nodes\n}\n}\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This style uses the Pkg option to find subs in a given package to call for each event. If none\nof the subs that this style looks for is there, then the effect of parsing with this style is to\nprint a canonical copy of the document without comments or declarations. All the subs receive as\ntheir 1st parameter the Expat instance for the document they're parsing.\n\nIt looks for the following routines:\n\n*   StartDocument\n\nCalled at the start of the parse .\n\n*   StartTag\n\nCalled for every start tag with a second parameter of the element type. The $ variable will\ncontain a copy of the tag and the % variable will contain attribute values supplied for\nthat element.\n\n*   EndTag\n\nCalled for every end tag with a second parameter of the element type. The $ variable will\ncontain a copy of the end tag.\n\n*   Text\n\nCalled just before start or end tags with accumulated non-markup text in the $ variable.\n\n*   PI\n\nCalled for processing instructions. The $ variable will contain a copy of the PI and the\ntarget and data are sent as 2nd and 3rd parameters respectively.\n\n*   EndDocument\n\nCalled at conclusion of the parse.\n",
                "subsections": []
            }
        }
    }
}