Can I search by ordinal position?

Topics: Developer Forum
Jul 29, 2010 at 12:24 AM
Edited Jul 29, 2010 at 12:25 AM
I'm trying to do a search like this: SelectNodes("//table[@class='content'][1]") In pure XPath, that would give me the FIRST table with a class of "content" (the "[1]" designates ordinal -- the first one, in this case). However, the result of that line of code returns TWO nodes, which should be impossible, since I'm asking for a specific ordinal. This makes me think that search for nodes by ordinal is not supported. True?
Aug 12, 2010 at 10:17 AM

try to add ()

(//table[@class='content'])[1]