Click here to get back home

XML::Twig parseurl with input Headers/XML

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
XML::Twig parseurl with input Headers/XML fochie 01-16-2005
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



Similar ThreadsPosted
Handle multiple input date formats? September 11, 2004, 11:56 am
reading from Net::Telnet input string problem June 16, 2006, 1:17 pm
AI::NNFLex , sum net - why doen't read correct @input set ? July 2, 2006, 10:54 am
No clickable input with activeperl mechanize.pm at line 1345 November 18, 2005, 1:54 pm
How to handle input and output of a program executed by System function in perl July 18, 2004, 2:31 pm
HTTP::Request::Form - Problem pressing input type=image button February 1, 2005, 7:56 am
XML Twig help April 8, 2005, 2:18 pm
Using XML::Twig December 19, 2005, 4:59 pm
XML::Twig June 9, 2006, 1:50 pm
XML::Twig June 9, 2006, 6:27 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap