| SOAP-WSDL documentation | Contained in the SOAP-WSDL distribution. |
SOAP::WSDL::Expat::MessageStreamParser - Convert SOAP messages to custom object trees
my $lwp = LWP::UserAgent->new();
my $parser = SOAP::WSDL::Expat::MessageParser->new({
class_resolver => 'My::Resolver'
});
my $chunk_parser = $parser->init();
# process response while it comes in, trying to read 32k chunks.
$lwp->request( $request, sub { $chunk_parser->parse_more($_[0]) } , 32468 );
$chunk_parser->parse_done();
my $obj = $parser->get_data();
ExpatNB based parser for parsing huge documents.
See SOAP::WSDL::Manual::Parser for details.
See SOAP::WSDL::Expat::MessageParser
Martin Kutter <martin.kutter fen-net.de>
Copyright 2007 Martin Kutter.
This file is part of SOAP-WSDL. You may distribute/modify it under the same terms as perl itself
$Rev: 851 $ $LastChangedBy: kutterma $ $Id: MessageStreamParser.pm 851 2009-05-15 22:45:18Z kutterma $ $HeadURL: https://soap-wsdl.svn.sourceforge.net/svnroot/soap-wsdl/SOAP-WSDL/trunk/lib/SOAP/WSDL/Expat/MessageStreamParser.pm $
| SOAP-WSDL documentation | Contained in the SOAP-WSDL distribution. |
#!/usr/bin/perl package SOAP::WSDL::Expat::MessageStreamParser; use strict; use warnings; use XML::Parser::Expat; use SOAP::WSDL::Expat::MessageParser; use base qw(SOAP::WSDL::Expat::MessageParser); use version; our $VERSION = qv('2.00.10'); sub parse_start { my $self = shift; $self->{ parser } = $_[0]->_initialize( XML::Parser::ExpatNB->new( Namespaces => 1 ) ); } sub init; *init = \&parse_start; sub parse_more { $_[0]->{ parser }->parse_more( $_[1] ); } sub parse_done { $_[0]->{ parser }->parse_done(); $_[0]->{ parser }->release(); } 1;