May 1, 2007 #1 defdefdef Technical User Jul 4, 2005 19 0 0 FR Hi, I need to parse a XML file which is in a protected folder. Is it possible to include my login/password in LWP::Simple ??? Thanks,
Hi, I need to parse a XML file which is in a protected folder. Is it possible to include my login/password in LWP::Simple ??? Thanks,
May 1, 2007 #2 travs69 MIS Dec 21, 2006 1,431 0 0 US is it in a web page?? You can usually do http://username:password@www.webpageblah.com Upvote 0 Downvote
May 1, 2007 Thread starter #3 defdefdef Technical User Jul 4, 2005 19 0 0 FR Hi, It's a XML file that I want to Parse. I try to use use LWP::UserAgent; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET => $link); $req->authorization_basic('login', 'password'); $document = $ua->request($req)->as_string; but ->as_string returns a text version of the document that I can't parse. I tried to do : $document = $ua->request($req); but there isan error. Upvote 0 Downvote
Hi, It's a XML file that I want to Parse. I try to use use LWP::UserAgent; $ua = LWP::UserAgent->new; $req = HTTP::Request->new(GET => $link); $req->authorization_basic('login', 'password'); $document = $ua->request($req)->as_string; but ->as_string returns a text version of the document that I can't parse. I tried to do : $document = $ua->request($req); but there isan error.
May 1, 2007 #4 travs69 MIS Dec 21, 2006 1,431 0 0 US why can't you parse the text version of the document? Upvote 0 Downvote
May 2, 2007 Thread starter #5 defdefdef Technical User Jul 4, 2005 19 0 0 FR usually I use : my $link = "http://www.pipo.com/pipo.xml";my $document = get($link); my $xp = XML::XPath->new(xml => $document); but with the authentification : $ua = LWP::UserAgent->new; my $link = "http://www.pipo.com/pipo.xml";$req = HTTP::Request->new(GET => $link); $req->authorization_basic('login', 'password'); $document = $ua->request($req)->as_string; my $xp = XML::XPath->new(filename => $document); I have an error with XPath (line 53) ?? any ideas, Upvote 0 Downvote
usually I use : my $link = "http://www.pipo.com/pipo.xml";my $document = get($link); my $xp = XML::XPath->new(xml => $document); but with the authentification : $ua = LWP::UserAgent->new; my $link = "http://www.pipo.com/pipo.xml";$req = HTTP::Request->new(GET => $link); $req->authorization_basic('login', 'password'); $document = $ua->request($req)->as_string; my $xp = XML::XPath->new(filename => $document); I have an error with XPath (line 53) ?? any ideas,