Sachin has asked for the wisdom of the Perl Monks concerning the following question:
use Data::Dumper; use XML::Simple; use WWW::Mechanize; my $login_url = "http://www.jstor.org/action/doXmlSearch?query=dc.titl +e+%3D+%22test%22&version=1.1&operation=searchRetrieve&recordSchema=in +fo%3Asrw%2Fschema%2F1%2Fdc-v1.1&maximumRecords=10&startRecord=1&a.dis +cipline=&recordPacking=xml"; my $mech = new WWW::Mechanize; $mech->get($login_url); my $xml = $mech->content; $xml =~ s/\<\?xml version="1.0" encoding="UTF-8"\?\>//ig; $xml =~ s/\<\?xml-stylesheet type="text\/xsl" href="\/templates\/xsl\/ +_jstor\/search\/searchRetrieveResponse.xsl"\?\>//ig; my $xs = XML::Simple->new(); my $ref = $xs->XMLin($xml); my $records_data = $ref->{'records'}->{'record'}->{'recordData'}->{'sr +w_dc:dc'}; foreach my $rd ($records_data){ my ($title) = $rd->{'dc:title'}; print "\n " . $title; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Show error "Out of Mermory"!!
by biohisham (Priest) on Oct 12, 2009 at 09:44 UTC | |
by Anonymous Monk on Oct 12, 2009 at 10:29 UTC | |
by almut (Canon) on Oct 12, 2009 at 12:41 UTC | |
by biohisham (Priest) on Oct 12, 2009 at 11:02 UTC | |
by Sachin (Acolyte) on Oct 12, 2009 at 11:56 UTC | |
|
Re: Show error "Out of Mermory"!!
by Anonymous Monk on Oct 12, 2009 at 08:43 UTC | |
by Sachin (Acolyte) on Oct 31, 2009 at 08:41 UTC | |
|
Re: Show error "Out of Mermory"!!
by Jenda (Abbot) on Oct 12, 2009 at 20:51 UTC |