Here you can find the source of getXPath()
static public XPath getXPath()
//package com.java2s; //License from project: Apache License import javax.xml.xpath.*; public class Main { static public XPath getXPath() { XPathFactory xPathfactory = XPathFactory.newInstance(); XPath xpath = xPathfactory.newXPath(); return xpath; }// w w w .j a va 2s . c o m }