0

Below is an example of the type of RSS structure I am trying to parse (it is not complete for ease of explanation):

<rss>
  <item>
    <span>
      <a href="test.html">test</a>
      <a href="test2.html">test 2</a>
    </span>
  </item>
  <item>
    <span>
      <a href="test3.html">test 3</a>
      <a href="test4.html">test 4</a>
    </span>
  </item>
</rss>

I have used the XPath Fetch Page module to fetch the page and used "//body/item" to select all the different item's.

My question is how do I select the second tag in the structure?

I can select the first tag by using something like item.span.a.content in Yahoo Pipes which would return "test" and "test 3" for the above example.

I want "test 2" and "test 4" to be returned. I thought that I could use something like item.span.a[1].content or item.span.a{1}.content but this does not seem to work.

I hope this is understandable I found it hard to explain.

user1464409
  • 1,032
  • 5
  • 18
  • 31

1 Answers1

1

The answer was to use: item.span.1.a.content

where 1 was the element in the a list that I needed.

user1464409
  • 1,032
  • 5
  • 18
  • 31