{
    "content": [
        {
            "type": "text",
            "text": "# XML::Handler::Subs (perldoc)\n\n## NAME\n\nXML::Handler::Subs - a PerlSAX handler base class for calling user-defined subs\n\n## SYNOPSIS\n\nuse XML::Handler::Subs;\npackage MyHandlers;\nuse vars qw{ @ISA };\nsub sNAME { my ($self, $element) = @ };\nsub eNAME { my ($self, $element) = @ };\n$self->{Names};    # an array of names\n$self->{Nodes};    # an array of $element nodes\n$handler = MyHandlers->new();\n$self->inelement($name);\n$self->withinelement($name);\n\n## DESCRIPTION\n\n\"XML::Handler::Subs\" is a base class for PerlSAX handlers. \"XML::Handler::Subs\" is subclassed to\nimplement complete behavior and to add element-specific handling.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION** (4 subsections)\n- **AUTHOR**\n- **SEE ALSO** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "XML::Handler::Subs",
        "section": "",
        "mode": "perldoc",
        "summary": "XML::Handler::Subs - a PerlSAX handler base class for calling user-defined subs",
        "synopsis": "use XML::Handler::Subs;\npackage MyHandlers;\nuse vars qw{ @ISA };\nsub sNAME { my ($self, $element) = @ };\nsub eNAME { my ($self, $element) = @ };\n$self->{Names};    # an array of names\n$self->{Nodes};    # an array of $element nodes\n$handler = MyHandlers->new();\n$self->inelement($name);\n$self->withinelement($name);",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 15,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 16,
                "subsections": [
                    {
                        "name": "perlobj",
                        "lines": 6
                    },
                    {
                        "name": "new",
                        "lines": 3
                    },
                    {
                        "name": "in_element",
                        "lines": 2
                    },
                    {
                        "name": "within_element",
                        "lines": 2
                    }
                ]
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 1,
                "subsections": [
                    {
                        "name": "perl",
                        "lines": 1
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "XML::Handler::Subs - a PerlSAX handler base class for calling user-defined subs\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "use XML::Handler::Subs;\n\npackage MyHandlers;\nuse vars qw{ @ISA };\n\nsub sNAME { my ($self, $element) = @ };\nsub eNAME { my ($self, $element) = @ };\n\n$self->{Names};    # an array of names\n$self->{Nodes};    # an array of $element nodes\n\n$handler = MyHandlers->new();\n$self->inelement($name);\n$self->withinelement($name);\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "\"XML::Handler::Subs\" is a base class for PerlSAX handlers. \"XML::Handler::Subs\" is subclassed to\nimplement complete behavior and to add element-specific handling.\n\nEach time an element starts, a method by that name prefixed with `s' is called with the element\nto be processed. Each time an element ends, a method with that name prefixed with `e' is\ncalled. Any special characters in the element name are replaced by underscores.\n\nSubclassing XML::Handler::Subs in this way is similar to XML::Parser's Subs style.\n\nXML::Handler::Subs maintains a stack of element names, `\"$self-\"{Names}', and a stack of element\nnodes, `\"$self-\"{Nodes}>' that can be used by subclasses. The current element is pushed on the\nstacks before calling an element-name start method and popped off the stacks after calling the\nelement-name end method. The `\"inelement()\"' and `\"withinelement()\"' calls use these stacks.\n\nIf the subclass implements `\"startdocument()\"', `\"enddocument()\"', `\"startelement()\"', and\n`\"endelement()\"', be sure to use `\"SUPER::\"' to call the the superclass methods also. See",
                "subsections": [
                    {
                        "name": "perlobj",
                        "content": "return 1 if an element-name method is called, they return 0 if no method was called.\n\nXML::Handler::Subs does not implement any other PerlSAX handlers.\n\nXML::Handler::Subs supports the following methods:\n"
                    },
                    {
                        "name": "new",
                        "content": "A basic `\"new()\"' method. `\"new()\"' takes a list of key, value pairs or a hash and creates\nand returns a hash with those options; the hash is blessed into the subclass.\n"
                    },
                    {
                        "name": "in_element",
                        "content": "Returns true if `$name' is equal to the name of the innermost currently opened element.\n"
                    },
                    {
                        "name": "within_element",
                        "content": "Returns the number of times the `$name' appears in Names.\n"
                    }
                ]
            },
            "AUTHOR": {
                "content": "Ken MacLeod, ken@bitsko.slc.ut.us\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "",
                "subsections": [
                    {
                        "name": "perl",
                        "content": ""
                    }
                ]
            }
        }
    }
}