|
Posted by fochie on January 16, 2005, 10:58 pm
Please log in for more thread options
Greetings,
I'm trying to use XML::Twig to parse XML input and have managed to get
things to work fine if I feed the Twig parser XML input that I first
obtain via my own seperate LWP call.
I would like to use the "parseurl" method of XML::Twig so that the
input is parsed as it arrives as opposed to waiting for the entire XML
to arrive and then starting the parse.
I'm not sure if/how I can specify the type of request I need with the
existing XML::Twig parseurl method format.
My existing LWP code requires supplying some headers and input XML
along with the url which I specify in this manner ...
$posturl = "http://myurl.com"; $objUserAgent = LWP::UserAgent->new;
$objHeader = HTTP::Headers->new;
$objHeader->push_header( ... a bunch of headers ...);
$request = ... my XML input data ...
$objRequest = HTTP::Request->new("POST", $posturl, $objHeader,
$request);
$objResponse = $objUserAgent->request($objRequest);
The format of the XML::Twig parseurl method is -
parseurl ($url $optional_user_agent)
Any assistance is most appreciated
Thanks,
Steve
My environment -
Intel 2.8Ghz
RAM 1024MB
OS - Red Hat EL 3 (on Intel)
Perl Version - v5.8.1 built for i686-linux
Perl Modules -
perl-libwww-perl-5.65-6
>> rpm -qa | grep XML
perl-XML-Dumper-0.4-25
perl-XML-Twig-3.09-3
perl-XML-Encoding-1.01-23
perl-XML-Grove-0.46alpha-25
PyXML-0.7.1-9
perl-XML-Parser-2.31-15
|