XPathType () { if (getXPathVersion() == XPathVersion.V1) { return XPathType.NUMBER; } else { if (isScientificNotation()) { return XPath2Type.DOUBLE; } else if (textContains('.')) { return XPath2Type.DECIMAL; } return XPath2Type.INTEGER; } }