| RPC-XML-Parser-XS documentation | view source | Contained in the RPC-XML-Parser-XS distribution. |
RPC::XML::Parser::XS - Fast XML-RPC parser written in C
use RPC::XML::Parser::XS;
my $req = parse_rpc_xml(qq{
<methodCall>
<methodName>foo.bar</methodName>
<params>
<param><value><string>Hello, world!</string></value></param>
</params>
</methodCall>
});
# $req is a RPC::XML::request
my $res = parse_rpc_xml(qq{
<methodResponse>
<fault>
<value>
<struct>
<member>
<name>faultCode</name>
<value><int>-1</int></value>
</member>
<member>
<name>faultString</name>
<value><string>No such method: foo.bar</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>
});
# $res is a RPC::XML::response
This module provides a single function parse_rpc_xml to parse XML-RPC request and response.
my $obj = parse_rpc_xml($xml);
Parse an XML-RPC methodCall or methodResponse. Resulting object is a RPC::XML::request or RPC::XML::response depending on the XML.
Note that UTF-8 flags aren't turned on in strings in the result structure. This behavior is different from RPC::XML::Parser.
parse_rpc_xml is exported by default. If you don't want it to be exported, just say like this:
use RPC::XML::Parser::XS ();
When I compared the performance of RPC::XML::Parser and RPC::XML::Parser::XS, the latter was nearly 20 times faster than the former. If you have any suspicion in this, please benchmark it yourself.
This is not a perl module. We don't use XML::LibXML. See http://xmlsoft.org/.
Copyright (C) 2007 YMIRLINK Inc.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself
| RPC-XML-Parser-XS documentation | view source | Contained in the RPC-XML-Parser-XS distribution. |