I am trying to select the first element in a set of resulting nodes after executing an xpath query.
When I do this:
//dl
I get the following result set:
[<dl>?…?</dl>?, <dl>?…?</dl>?]
How can I get the first one? Neither of these work:
//dl[1]
//dl[position()=1]
I am executing this in Chrome's Web Inspector.
question from:https://stackoverflow.com/questions/9199415/getting-first-node-in-xpath-result-set