{
    "content": [
        {
            "type": "text",
            "text": "# RPC::XML::Parser (perldoc)\n\n## NAME\n\nRPC::XML::Parser - Interface for parsers created by RPC::XML::ParserFactory\n\n## SYNOPSIS\n\nThis class is not instantiated directly; see RPC::XML::ParserFactory.\n\n## DESCRIPTION\n\nThe RPC::XML::Parser class encapsulates the interface for the parsing process. It is an empty\nclass that is used in conjuntion with the RPC::XML::ParserFactory class.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **SUBROUTINES/METHODS** (1 subsections)\n- **DIAGNOSTICS**\n- **BUGS**\n- **SUPPORT**\n- **LICENSE AND COPYRIGHT**\n- **CREDITS**\n- **SEE ALSO**\n- **AUTHOR**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "RPC::XML::Parser",
        "section": "",
        "mode": "perldoc",
        "summary": "RPC::XML::Parser - Interface for parsers created by RPC::XML::ParserFactory",
        "synopsis": "This class is not instantiated directly; see RPC::XML::ParserFactory.",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "SUBROUTINES/METHODS",
                "lines": 6,
                "subsections": [
                    {
                        "name": "new",
                        "lines": 68
                    }
                ]
            },
            {
                "name": "DIAGNOSTICS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "BUGS",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "SUPPORT",
                "lines": 24,
                "subsections": []
            },
            {
                "name": "LICENSE AND COPYRIGHT",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "CREDITS",
                "lines": 3,
                "subsections": []
            },
            {
                "name": "SEE ALSO",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "AUTHOR",
                "lines": 2,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "RPC::XML::Parser - Interface for parsers created by RPC::XML::ParserFactory\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "This class is not instantiated directly; see RPC::XML::ParserFactory.\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The RPC::XML::Parser class encapsulates the interface for the parsing process. It is an empty\nclass that is used in conjuntion with the RPC::XML::ParserFactory class.\n\nAll parser implementations that are intended to be returned by calls to\nRPC::XML::ParserFactory::new() should declare this as their parent class.\n",
                "subsections": []
            },
            "SUBROUTINES/METHODS": {
                "content": "This class provides empty implementations for the following methods. A parser implementation\nmust provide definitions for both of these methods. If the versions from this class are\ntriggered they will throw exceptions (\"die\").\n\nThe descriptions below define the interface that implementations must adhere to.\n",
                "subsections": [
                    {
                        "name": "new",
                        "content": "Create a new instance of the class. Any extra data passed to the constructor is taken as\nkey/value pairs (not a hash reference) and attached to the object.\n\nThe following parameters are currently recognized:\n\nbase64tofh\nIf passed with a true value, this tells the parser that incoming Base64 data is to\nbe spooled to a filehandle opened onto an anonymous temporary file. The file itself\nis unlinked after opening, though the resulting RPC::XML::base64 object can use its\n\"tofile\" method to save the data to a specific file at a later point. No checks on\nsize are made; if this option is set, all Base64 data goes to filehandles.\n\nbase64tempdir\nIf this argument is passed, the value is taken as the directory under which the\ntemporary files are created. This is so that the application is not locked in to the\nlist of directories that File::Spec defaults to with its \"tmpdir\" method. If this is\nnot passed, the previously-mentioned method is used to derive the directory in which\nto create the temporary files. Only relevant if base64tofh is set.\n\nThe \"base64*\" parameters do not have to be implemented if the user has no plans to use the\n\"tofile\" method of the RPC::XML::base64 data-class.\n\nAs a special-case, to preserve backwards compatibility with pre-0.69 versions of this\npackage, new() has special behavior when specifically called for the package\nRPC::XML::Parser. When called for this package, the constructor quietly loads\nRPC::XML::ParserFactory and uses it to construct and return an instance of a parser based on\nXML::Parser.\n\nparse [ STRING | STREAM ]\nParse the XML document specified in either a string or a stream. The stream may be any file\ndescriptor, derivative of IO::Handle, etc.\n\nThe value returned must be one of the following:\n\nRPC::XML::request instance\nWhen passed a valid XML-RPC request message, the return value should be an instance of\nthe RPC::XML::request class.\n\nRPC::XML::response instance\nLikewise, when passed a valid XML-RPC response, the return value should be an instance\nof the RPC::XML::response class.\n\nstring containing an error message\nIf the message does not conform to either a request or a response, or does not properly\nparse, the return value must be a string containing the error message.\n\nA non-blocking (push) parser instance\nIf no arguments are passed in, the return value must be a parser object that implements\npush-parsing (non-blocking). It does not have to be of the same class as the original\nobject, but it must support the remaining two methods\n\nThe next two methods are only called on push-parser instances, and as such do not have to be\nimplemented by the actual factory-compatible parser. It is enough if the non-blocking parser\ninstance it returns from the no-argument call to parse() implements these:\n\nparsemore STRING\nSend a chunk of the current XML document to the parser for processing.\n\nparsedone\nSignal the end of parsing. The return value from this should be one of the same three\npossibilities that the direct use of parse() (above) returns:\n\nRPC::XML::request instance\nRPC::XML::response instance\nstring containing an error message\n\nparsedone() may also signal an error by throwing an exception.\n"
                    }
                ]
            },
            "DIAGNOSTICS": {
                "content": "Unless otherwises specified, routines return the object reference itself upon a successful\noperation, and an error string (which is not a blessed reference) upon error.\n",
                "subsections": []
            },
            "BUGS": {
                "content": "Please report any bugs or feature requests to \"bug-rpc-xml at rt.cpan.org\", or through the web\ninterface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RPC-XML>. I will be notified, and\nthen you'll automatically be notified of progress on your bug as I make changes.\n",
                "subsections": []
            },
            "SUPPORT": {
                "content": "*   RT: CPAN's request tracker\n\n<http://rt.cpan.org/NoAuth/Bugs.html?Dist=RPC-XML>\n\n*   AnnoCPAN: Annotated CPAN documentation\n\n<http://annocpan.org/dist/RPC-XML>\n\n*   CPAN Ratings\n\n<http://cpanratings.perl.org/d/RPC-XML>\n\n*   Search CPAN\n\n<http://search.cpan.org/dist/RPC-XML>\n\n*   MetaCPAN\n\n<https://metacpan.org/release/RPC-XML>\n\n*   Source code on GitHub\n\n<http://github.com/rjray/rpc-xml>\n",
                "subsections": []
            },
            "LICENSE AND COPYRIGHT": {
                "content": "This file and the code within are copyright (c) 2011 by Randy J. Ray.\n\nCopying and distribution are permitted under the terms of the Artistic License 2.0\n(<http://www.opensource.org/licenses/artistic-license-2.0.php>) or the GNU LGPL 2.1\n(<http://www.opensource.org/licenses/lgpl-2.1.php>).\n",
                "subsections": []
            },
            "CREDITS": {
                "content": "The XML-RPC standard is Copyright (c) 1998-2001, UserLand Software, Inc. See\n<http://www.xmlrpc.com> for more information about the XML-RPC specification.\n",
                "subsections": []
            },
            "SEE ALSO": {
                "content": "RPC::XML, RPC::XML::ParserFactory, RPC::XML::Parser::XMLParser\n",
                "subsections": []
            },
            "AUTHOR": {
                "content": "Randy J. Ray <rjray@blackperl.com>\n",
                "subsections": []
            }
        }
    }
}