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]
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.OkRead more