Elements with mixed text

Task

Source document

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

Challenge

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

Note that the method »ends-with()« is a function of XPath 2.0. onion.net currently only supports functions from XPath 1.0.

Desired selection (XML-output)

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

Exercise

Your input

Eine Lösung wäre: Lösung