Yes, there is. But you actually don't want the second <d/>
element, as there is none in the given context. If you apply the position filter (i.e. using [2]
) it means you want the second <d/>
element within the given <c/>
element. But every <c/>
only has one <d/>
, so you will always yield an empty result.
Hence, the correct XPath would be:
curl http://localhost:5000/home/content?xpath=/a/c[2]/d