0
votes

I know how I can select the first node of XPath selection. I know how I can select the node with concrete in XPath selection.

//shipTo[@country='US']

//shipTo[1]

But how to connect it and get the first node with the concrete class ?

1

1 Answers

0
votes

How does (//shipTo[@country='US'])[1] work for you?

That would be the first node in the document with that class.

If you want all the first children with this class of some parent nodes, you could simply use //shipTo[@country='US'][1]