RPC::XML::Parser - A container class for XML::Parser
use RPC::XML::Parser; ... $P = new RPC::XML::Parser; $P->parse($message);
The RPC::XML::Parser class encapsulates the parsing process, for turning a string or an input stream into a RPC::XML::request or RPC::XML::response object. The XML::Parser class is used internally, with a new instance created for each call to parse (detailed below). This allows the RPC::XML::Parser object to be reusable, even though the XML::Parser objects are not. The methods are:
parse
Create a new instance of the class. Any extra data passed to the constructor is taken as key/value pairs (not a hash reference) and attached to the object.
Parse the XML document specified in either a string or a stream. The stream may be any file descriptor, derivative of IO::Handle, etc. The return value is either an object reference (to one of RPC::XML::request or RPC::XML::response) or an error string. Any non-reference return value should be treated as an error condition.
The constructor returns undef upon failure, with the error message available in the global variable $RPC::XML::ERROR.
undef
$RPC::XML::ERROR
This is part of a reference implementation in which clarity of process and readability of the code take precedence over general efficiency. Much, if not all, of this can be written more compactly and/or efficiently.
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.
This module is licensed under the terms of the Artistic License that covers Perl itself. See <http://language.perl.com/misc/Artistic.html> for the license itself.
RPC::XML, RPC::XML::Client, RPC::XML::Server, XML::Parser
Randy J. Ray <rjray@blackperl.com>
To install RPC::XML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm RPC::XML
CPAN shell
perl -MCPAN -e shell install RPC::XML
For more information on module installation, please visit the detailed CPAN module installation guide.