Hi biohisham, Thanks for reply i also done by saving xml in file but the problem("OUT OF MEMORY") didn't solve. So please tell any other way to solve out it. Could u tell me what's "Pseudo-hashes are deprecated" and how to solve it. I am new to perl so that have so many problem.
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; open (OUT, "> jestor_1.xml") || \ &htmlDie ("Error: Could not open output file!\n"); my @contents = split '\n', $xml; my $line; foreach $line (@contents) { chomp($line); next if ( $line =~ /^\s*$/m ); print OUT "$line\n"; } close (OUT); my $xs = XML::Simple->new(ForceArray => 'srw_dc:dc'); my $ref = $xs->XMLin("jestor_1.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; }
In reply to Re^2: Show error "Out of Mermory"!!
by Anonymous Monk
in thread Show error "Out of Mermory"!!
by Sachin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |