Rufnex has asked for the wisdom of the Perl Monks concerning the following question:
i try to parse the result of a amazon xml response via the webservice. if i call this service i got an xml Datafile like this:
<Details url="http://www.amazon.com/exec/obidos/redirect?tag=webser +vices-20%26creative=666%26camp=2025%26link_code=xm2%26path=ASIN/05960 +00480"> <Asin>0596000480</Asin> <Authors> <Author>David Flanagan</Author> </Authors> <Lists> <ListId>IEF1DNVKZO8B</ListId> <ListId>1R36BE3AUD988</ListId> <ListId>3S02XL0KTQDW0</ListId> </Lists> <BrowseList> <BrowseNode> <BrowseName>Computer Books: Languages</BrowseName> </BrowseNode> <BrowseNode> <BrowseName>Computer Programming Languages</BrowseName> </BrowseNode> </BrowseList> <Reviews> <AvgCustomerRating>4.31</AvgCustomerRating> <TotalCustomerReviews>178</TotalCustomerReviews> <CustomerReview> <Rating>5</Rating> <Summary>Excellent reference, not a "how to" book</Summary +> <Comment>... comment ...</Comment> </CustomerReview> <CustomerReview> <Rating>5</Rating> <Summary>Superb Reference</Summary> <Comment>... comment ...</Comment> </CustomerReview> </Reviews> </Details>
$xmltree->{Node}
But for the deeper nested Nodes i've no idee how to catch it? And also the Attributes like "url" in the Details-Node.
Thx for any help ;o)
Rufnex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: How to parse this XML?
by jeffa (Bishop) on Jun 20, 2003 at 14:33 UTC | |
|
Re: How to parse this XML?
by gellyfish (Monsignor) on Jun 20, 2003 at 14:31 UTC | |
|
Re: How to parse this XML?
by grantm (Parson) on Jun 20, 2003 at 18:04 UTC | |
|
Re: How to parse this XML?
by Rufnex (Novice) on Jun 20, 2003 at 21:25 UTC |