1RPC::XML::ParserFactoryU(s3e)r Contributed Perl DocumentaRtPiCo:n:XML::ParserFactory(3)
2
3
4

NAME

6       RPC::XML::ParserFactory - A factory class for RPC::XML::Parser objects
7

SYNOPSIS

9           use RPC::XML::ParserFactory;
10           ...
11           $P = RPC::XML::ParserFactory->new();
12           $P->parse($message);
13

DESCRIPTION

15       The RPC::XML::ParserFactory class encapsulates the process of creating
16       parser objects that adhere to the interface described in
17       RPC::XML::Parser.  Under the hood, the parser object created and
18       returned could be from any of a number of implementation classes.
19

IMPORT-TIME ARGUMENTS

21       You can specify a particular underlying parser class to use, if you do
22       not want RPC::XML::ParserFactory to use the default class. This is done
23       with the "class" keyword:
24
25           use RPC::XML::ParserFactory (class => 'XML::Parser');
26
27       The value may be the name for any of the built-in classes, or it may be
28       the name of a class that inherits from RPC::XML::Parser (and can thus
29       be "manufactured" by the factory). The value is saved and becomes the
30       default class for any calls to new that do not explicitly name a class
31       to use.
32
33       Note that if the specified class is not valid, this is not tested until
34       the first call to new, at which point an invalid class will cause an
35       exception (error) to occur. The constructor will return "undef" and the
36       $RPC::XML::ERROR variable will contain the error message.
37
38   Names of Built-In Parsers
39       The following names are valid when specified as the value of the
40       "class" argument described above:
41
42       XML::Parser
43       xml::parser
44       xmlparser
45           All of these specify the parser implementation based on the
46           XML::Parser module. This is the default parser if the user does not
47           specify any alternative.
48
49       XML::LibXML
50       xml::libxml
51       xmllibxml
52           These specify a parser implementation based on the XML::LibXML
53           module.  This is a new parser and not as well-vetted as the
54           previous one, hence it must be explicitly requested.
55

SUBROUTINES/METHODS

57       The methods are:
58
59       new([ARGS])
60           Create a new instance of the class. Any extra data passed to the
61           constructor is taken as key/value pairs (not a hash reference) and
62           attached to the object.
63
64           This method passes all arguments on to the new() method of the
65           chosen implementation class, except for the following:
66
67           class NAME
68               If the user chooses, they may specify an explicit class to use
69               for parsers when calling new(). If passed, this overrides any
70               value that was given at use-time (processed by import()).
71

DIAGNOSTICS

73       The constructor returns "undef" upon failure, with the error message
74       available in the global variable $RPC::XML::ERROR.
75

BUGS

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

SUPPORT

84       ·   RT: CPAN's request tracker
85
86           <http://rt.cpan.org/NoAuth/Bugs.html?Dist=RPC-XML>
87
88       ·   AnnoCPAN: Annotated CPAN documentation
89
90           <http://annocpan.org/dist/RPC-XML>
91
92       ·   CPAN Ratings
93
94           <http://cpanratings.perl.org/d/RPC-XML>
95
96       ·   Search CPAN
97
98           <http://search.cpan.org/dist/RPC-XML>
99
100       ·   MetaCPAN
101
102           <https://metacpan.org/release/RPC-XML>
103
104       ·   Source code on GitHub
105
106           <http://github.com/rjray/rpc-xml>
107
109       This file and the code within are copyright (c) 2011 by Randy J. Ray.
110
111       Copying and distribution are permitted under the terms of the Artistic
112       License 2.0
113       (<http://www.opensource.org/licenses/artistic-license-2.0.php>) or the
114       GNU LGPL 2.1 (<http://www.opensource.org/licenses/lgpl-2.1.php>).
115

CREDITS

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

SEE ALSO

122       RPC::XML, RPC::XML::Client, RPC::XML::Server, XML::Parser
123

AUTHOR

125       Randy J. Ray "<rjray@blackperl.com>"
126
127
128
129perl v5.32.0                      2020-07-28        RPC::XML::ParserFactory(3)
Impressum