Filtering by attribute value

Task

Source document

<jobs>
  <job priority="critical" name="Müll rausbringen" />
  <job priority="low" name="Möbel säubern" />
  <job priority="low" name="Teppich reinigen" />
  <job priority="medium" name="Fenster putzen" />
  <job priority="high" name="Pflanzen gießen" />
</jobs>

Challenge

Select all jobs with a priority corresponding to the value “critical” or “high”.

Desired selection (XML-output)

  • <job priority="critical" name="Müll rausbringen" />
  • <job priority="high" name="Pflanzen gießen" />

Exercise

Your input

Eine Lösung wäre: Lösung