XPath: How to select node with some attribute by index?

I have several nodes with some particular attribute and I need to select one of them by index. For example I need to select second

with 'test' class - //div[@class='test'][2] doesn't work.

Is there a way to select node with some attribute by index ? How to do it?

22
задан HongKilDong 28 April 2011 в 12:45
поделиться