user3579111
user3579111

Reputation: 41

XPATH- Simple query

<Item>
  <ASIN>0545010225</ASIN>
  <DetailPageURL>http://www.amazon.com/Harry-Potter-Deathly-Hallows-Book/dp/0545010225%3FSubscriptionId%3DAKIAJ5YASVREOJN4AKXQ%26tag%3Dws%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0545010225</DetailPageURL>
  <ItemAttributes>
    <Author>J.K. Rowling</Author>
    <Creator Role="Illustrator">Mary GrandPré</Creator>
    <Manufacturer>Arthur A. Levine Books</Manufacturer>
    <ProductGroup>Book</ProductGroup>
    <Title>Harry Potter and the Deathly Hallows (Book 7)</Title>
  </ItemAttributes>
</Item>

I need to show the ASIN of all items authored by J.K. Rowling. This is an example of one of the books that would fall into this category. What would be the Xpath that would accomplish this?

Upvotes: 1

Views: 64

Answers (1)

kjhughes
kjhughes

Reputation: 111726

Here is an XPath expression for the ASIN numbers of all Items authored by J.K. Rowling:

/Item[ItemAttributes/Author = 'J.K. Rowling']/ASIN

Upvotes: 1

Related Questions