replaced Stax with XPath