Do you have a question? Post it now! No Registration Necessary. Now with pictures!
January 17, 2005, 3:58 am
rate this thread
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,
$objResponse = $objUserAgent->request($objRequest);
The format of the XML::Twig parseurl method is -
parseurl ($url $optional_user_agent)
Any assistance is most appreciated
My environment -
OS - Red Hat EL 3 (on Intel)
Perl Version - v5.8.1 built for i686-linux
Perl Modules -
>> rpm -qa | grep XML