Code example for XPathFactory

Methods: newXPath

0
	 *  
	 * @param androidPrefix 
	 *            The namespace prefix. 
	 */ 
	public static XPath newXPath(String androidPrefix) {
		XPath xpath = sFactory.newXPath();
		xpath.setNamespaceContext(new AndroidNamespaceContext(androidPrefix));
		return xpath;
	} 
 
	/** 
	 * Creates a new XPath object using the default prefix for the android 
	 * namespace. 
	 *  
	 * @see #DEFAULT_NS_PREFIX 
	 */ 
	public static XPath newXPath() {
		XPath xpath = sFactory.newXPath();
		xpath.setNamespaceContext(AndroidNamespaceContext.getDefault());
		return xpath;
	}