in reply to Re: Re: Reading an XML page
in thread Reading an XML page

Not sure if it will help you, but LWP::Simple seems to work ok.

D:\Perl\test>perl58 -mLWP::Simple=getprint -e" getprint 'http://xml.am +azon.com/onca/xml2?t=webservices-20&dev-t=D3N1ICFCFE4DHV&AsinSearch=1 +565924193&type=lite&f=xml'" <?xml version="1.0" encoding="UTF-8"?><ProductInfo xmlns:xsi="http://w +ww.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="htt +p://xml.amazon.com/schemas2/dev-lite.xsd"> <Details url="http://www.amazon.com/exec/obidos/redirect?tag=webser +vices-20%26creative=D3N1ICFCFE4DHV%26camp=2025%26link_code=xm2%26path +=ASIN/1565924193"> <Asin>1565924193</Asin> <ProductName>CGI Programming with Perl</ProductName> <Catalog>Book</Catalog> <Authors> <Author>Gunther Birznieks</Author> <Author>Scott Guelich</Author> <Author>Shishir Gundavaram</Author> </Authors> <ReleaseDate>15 January, 2000</ReleaseDate> <Manufacturer>O'Reilly &amp; Associates</Manufacturer> <ImageUrlSmall>http://images.amazon.com/images/P/1565924193.01.T +HUMBZZZ.jpg</ImageUrlSmall> <ImageUrlMedium>http://images.amazon.com/images/P/1565924193.01. +MZZZZZZZ.jpg</ImageUrlMedium> <ImageUrlLarge>http://images.amazon.com/images/P/1565924193.01.L +ZZZZZZZ.jpg</ImageUrlLarge> <ListPrice>$34.95</ListPrice> <OurPrice>$24.47</OurPrice> <UsedPrice>$13.99</UsedPrice> </Details> </ProductInfo>

I tried the latest version of your script you posted, and it too hung on the read from the socket. I can't see why either.


Examine what is said, not who speaks.
"Efficiency is intelligent laziness." -David Dunham
"When I'm working on a problem, I never think about beauty. I think only how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong." -Richard Buckminster Fuller


Replies are listed 'Best First'.
Re: Re: Re: Re: Reading an XML page
by Guildencrantz (Sexton) on May 28, 2003 at 05:49 UTC
    Thanks a lot for the help. I really don't know what happened with the script: yesterday it worked, today it didn't. Very strange. It seems almost like Amazon's server was keeping the connection alive.

    Well, if LWP is working that's what I'll rewrite the script to use. Again, I appreciate the input.

    ~~Guildencrantz