Modified XPathHandler class