.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "RPC::XML::ParserFactory 3pm" .TH RPC::XML::ParserFactory 3pm "2021-01-10" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" RPC::XML::ParserFactory \- A factory class for RPC::XML::Parser objects .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 4 \& use RPC::XML::ParserFactory; \& ... \& $P = RPC::XML::ParserFactory\->new(); \& $P\->parse($message); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" The \fBRPC::XML::ParserFactory\fR class encapsulates the process of creating parser objects that adhere to the interface described in RPC::XML::Parser. Under the hood, the parser object created and returned could be from any of a number of implementation classes. .SH "IMPORT-TIME ARGUMENTS" .IX Header "IMPORT-TIME ARGUMENTS" You can specify a particular underlying parser class to use, if you do not want \fBRPC::XML::ParserFactory\fR to use the default class. This is done with the \f(CW\*(C`class\*(C'\fR keyword: .PP .Vb 1 \& use RPC::XML::ParserFactory (class => \*(AqXML::Parser\*(Aq); .Ve .PP The value may be the name for any of the built-in classes, or it may be the name of a class that inherits from \fBRPC::XML::Parser\fR (and can thus be \&\*(L"manufactured\*(R" by the factory). The value is saved and becomes the default class for any calls to \fBnew\fR that do not explicitly name a class to use. .PP Note that if the specified class is not valid, this is not tested until the first call to \fBnew\fR, at which point an invalid class will cause an exception (error) to occur. The constructor will return \f(CW\*(C`undef\*(C'\fR and the \&\fB\f(CB$RPC::XML::ERROR\fB\fR variable will contain the error message. .SS "Names of Built-In Parsers" .IX Subsection "Names of Built-In Parsers" The following names are valid when specified as the value of the \f(CW\*(C`class\*(C'\fR argument described above: .IP "XML::Parser" 4 .IX Item "XML::Parser" .PD 0 .IP "xml::parser" 4 .IX Item "xml::parser" .IP "xmlparser" 4 .IX Item "xmlparser" .PD All of these specify the parser implementation based on the \fBXML::Parser\fR module. This is the default parser if the user does not specify any alternative. .IP "XML::LibXML" 4 .IX Item "XML::LibXML" .PD 0 .IP "xml::libxml" 4 .IX Item "xml::libxml" .IP "xmllibxml" 4 .IX Item "xmllibxml" .PD These specify a parser implementation based on the \fBXML::LibXML\fR module. This is a new parser and not as well-vetted as the previous one, hence it must be explicitly requested. .SH "SUBROUTINES/METHODS" .IX Header "SUBROUTINES/METHODS" The methods are: .IP "new([\s-1ARGS\s0])" 4 .IX Item "new([ARGS])" Create a new instance of the class. Any extra data passed to the constructor is taken as key/value pairs (\fBnot\fR a hash reference) and attached to the object. .Sp This method passes all arguments on to the \fBnew()\fR method of the chosen implementation class, except for the following: .RS 4 .IP "class \s-1NAME\s0" 4 .IX Item "class NAME" If the user chooses, they may specify an explicit class to use for parsers when calling \fBnew()\fR. If passed, this overrides any value that was given at use-time (processed by \fBimport()\fR). .RE .RS 4 .RE .SH "DIAGNOSTICS" .IX Header "DIAGNOSTICS" The constructor returns \f(CW\*(C`undef\*(C'\fR upon failure, with the error message available in the global variable \fB\f(CB$RPC::XML::ERROR\fB\fR. .SH "BUGS" .IX Header "BUGS" Please report any bugs or feature requests to \&\f(CW\*(C`bug\-rpc\-xml at rt.cpan.org\*(C'\fR, or through the web interface at . I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. .SH "SUPPORT" .IX Header "SUPPORT" .IP "\(bu" 4 \&\s-1RT: CPAN\s0's request tracker .Sp .IP "\(bu" 4 AnnoCPAN: Annotated \s-1CPAN\s0 documentation .Sp .IP "\(bu" 4 \&\s-1CPAN\s0 Ratings .Sp .IP "\(bu" 4 Search \s-1CPAN\s0 .Sp .IP "\(bu" 4 MetaCPAN .Sp .IP "\(bu" 4 Source code on GitHub .Sp .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" This file and the code within are copyright (c) 2011 by Randy J. Ray. .PP Copying and distribution are permitted under the terms of the Artistic License 2.0 () or the \s-1GNU LGPL 2.1\s0 (). .SH "CREDITS" .IX Header "CREDITS" The \fBXML-RPC\fR standard is Copyright (c) 1998\-2001, UserLand Software, Inc. See for more information about the \fBXML-RPC\fR specification. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\s-1RPC::XML\s0, RPC::XML::Client, RPC::XML::Server, XML::Parser .SH "AUTHOR" .IX Header "AUTHOR" Randy J. Ray \f(CW\*(C`\*(C'\fR