Filtering by key and numerical value

Task

Source document

<items>
  <item width="25" unit="px" />
  <item width="50" unit="px" />
  <item width="65" unit="px" />
  <item width="100" unit="px" />
  <item width="15" unit="pt" />
  <item width="40" unit="%" />
  <item width="25" unit="px" />
</items>

Challenge

Output all item elements which are specified in “px” and do not exceed the value of 70

Desired selection (XML-output)

  • <item width="25" unit="px" />
  • <item width="50" unit="px" />
  • <item width="65" unit="px" />
  • <item width="25" unit="px" />

Exercise

Your input

Eine Lösung wäre: Lösung