# phpman > perldoc > RPC::XML::Parser::XMLParser

## NAME
    [RPC::XML::Parser::XMLParser](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParser%3A%3AXMLParser/markdown) - A container class for [XML::Parser](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AParser/markdown)

## SYNOPSIS
        # This class should rarely (if ever) be used directly:

        use [RPC::XML::ParserFactory](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParserFactory/markdown) '[XML::Parser](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AParser/markdown)';
        ...
        $P = [RPC::XML::ParserFactory](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParserFactory/markdown)->new();
        $P->parse($message);

## DESCRIPTION
    This class implements the interface defined in the [RPC::XML::Parser](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParser/markdown) factory-class (see
    [RPC::XML::Parser](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParser/markdown)) using the [XML::Parser](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AParser/markdown) module to handle the actual manipulation of XML.

## SUBROUTINES/METHODS
    This module implements the public-facing methods as described in [RPC::XML::Parser](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParser/markdown):

    new [ ARGS ]
        The constructor only recognizes the two parameters specified in the base class (for the
        [RPC::XML::base64](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3Abase64/markdown) file-spooling operations).

    parse [ STRING | STREAM ]
        The parse() method accepts either a string of XML, a filehandle of some sort, or no argument
        at all. In the latter case, the return value is a parser instance that acts as a push-parser
        (a non-blocking parser). For the first two types of input, the return value is either a
        message object (one of [RPC::XML::request](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3Arequest/markdown) or [RPC::XML::response](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3Aresponse/markdown)) or an error.

    parse_more STRING
        (Only callable on a push-parser instance) Parses the chunk of XML, which does not have to
        describe a complete document, and adds it to the current running document. If this method is
        called on a parser instance that is not a push-parser, an exception is thrown.

    parse_done
        (Only callable on a push-parser instance) Finishes the parsing process and returns either a
        message object (one of [RPC::XML::request](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3Arequest/markdown) or [RPC::XML::response](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3Aresponse/markdown)) or an error (if the document
        was incomplete, not well-formed, or not valid). If this method is called on a parser
        instance that is not a push-parser, an exception is thrown.

## DIAGNOSTICS
    All methods return some type of reference on success. The new and parse methods return message
    strings on errors. The parse_more and parse_done methods may throw exceptions on errors, if the
    error occurs at the [XML::Parser](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AParser/markdown) level.

## EXTERNAL ENTITIES
    As of version 1.24 of this module (version 0.75 of the [RPC::XML](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML/markdown) suite), external entities whose
    URI is a "file:/" scheme (local file) are explicitly ignored. This is for security purposes.

## BUGS
    Please report any bugs or feature requests to "bug-rpc-xml at rt.cpan.org", or through the web
    interface at <<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RPC-XML>>. I will be notified, and
    then you'll automatically be notified of progress on your bug as I make changes.

## SUPPORT
    *   RT: CPAN's request tracker

        <<http://rt.cpan.org/NoAuth/Bugs.html?Dist=RPC-XML>>

    *   AnnoCPAN: Annotated CPAN documentation

        <<http://annocpan.org/dist/RPC-XML>>

    *   CPAN Ratings

        <<http://cpanratings.perl.org/d/RPC-XML>>

    *   Search CPAN

        <<http://search.cpan.org/dist/RPC-XML>>

    *   MetaCPAN

        <<https://metacpan.org/release/RPC-XML>>

    *   Source code on GitHub

        <<http://github.com/rjray/rpc-xml>>

## LICENSE AND COPYRIGHT
    This file and the code within are copyright (c) 2011 by Randy J. Ray.

    Copying and distribution are permitted under the terms of the Artistic License 2.0
    (<<http://www.opensource.org/licenses/artistic-license-2.0.php>>) or the GNU LGPL 2.1
    (<<http://www.opensource.org/licenses/lgpl-2.1.php>>).

## CREDITS
    The XML-RPC standard is Copyright (c) 1998-2001, UserLand Software, Inc. See
    <<http://www.xmlrpc.com>> for more information about the XML-RPC specification.

## SEE ALSO
    [RPC::XML](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML/markdown), [RPC::XML::Parser](https://www.chedong.com/phpMan.php/perldoc/RPC%3A%3AXML%3A%3AParser/markdown), [XML::Parser](https://www.chedong.com/phpMan.php/perldoc/XML%3A%3AParser/markdown)

## AUTHOR
    Randy J. Ray <<rjray@blackperl.com>>

