I have this code:
<p class='test'>
Text1
</p>
<p class='test'>
Text1
</p>
With Hpple (XPath), I need to read the first <p class='test'>, and the second, but I dont know how to do this.
Maybe like:
//p[@class='test'][1]
//p[@class='test'][2]
Thanks
Try this:
You have more elements so loop the ‘elements’ array, in this case you could do [elements objectAtIndex:0] and [elements objectAtIndex:1].