XPathResult type correction