Conditional element selection

Task

Source document

<document xmlns:xlink="http://www.w3.org/1999/xlink">
  <linkList name="A">
    <document xlink:href="15024" />
    <document xlink:href="15028" />
  </linkList>
  <linkList name="B">
    <document xlink:href="15030" />
    <document xlink:href="15032" />
  </linkList>
</document>

Challenge

Select all document elements below the node “linkList” with the name A.

Desired selection (XML-output)

  • <document xlink:href="15024" xmlns:xlink="http://www.w3.org/1999/xlink" />
  • <document xlink:href="15028" xmlns:xlink="http://www.w3.org/1999/xlink" />

Exercise

Your input

Eine Lösung wäre: Lösung