NAME

RPC::XML::Parser::XS - Fast XML-RPC parser written in C

SYNOPSIS

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

DESCRIPTION

This module provides a single function "parse_rpc_xml" to parse XML-RPC request and response.

parse_rpc_xml
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.

EXPORT

"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 ();

PERFORMANCE

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.

DEPENDENCY

Libxml2

This is not a perl module. We don't use XML::LibXML. See http://xmlsoft.org/.

IPC::Run
MIME::Base64
RPC::XML

SEE ALSO

RPC::XML::Parser

COPYRIGHT AND LICENSE

Copyright (C) 2007 YMIRLINK Inc. All Rights Reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself