in reply to Get non transformed XML
Is there a way to use LWP:Simple to get the source of an XML document without the XSL transformation.I doubt LWP::Simple has anything to do with XSL translation of some XML document loaded by a webserver.
if I got to the site and hit view source I can see the XML with no problemMy intuition is that the webserver is detecting the browser "agent" string and has determined that your browser (LWP::Simple) can't apply the stylesheet itself, so the webserver is doing the translation server-side for you.
Try using LWP::UserAgent and:
$ua->agent('Mozilla/5.0');
$ua->agent('Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/2006120418 Firefox/2.0.0.1');
Update: fixed agent string, thanks Gangabass.
-David
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Get non transformed XML
by Danikar (Novice) on Nov 22, 2007 at 08:57 UTC | |
by Gangabass (Vicar) on Nov 22, 2007 at 09:06 UTC | |
by Danikar (Novice) on Nov 22, 2007 at 09:40 UTC | |
by erroneousBollock (Curate) on Nov 22, 2007 at 09:10 UTC |
In Section
Seekers of Perl Wisdom