Here you can find the source of getXPath()
public static XPath getXPath()
//package com.java2s; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathFactory; public class Main { public static XPath getXPath() { return XPathFactory.newInstance().newXPath(); }/*from ww w. ja v a 2 s . co m*/ }