protected boolean evaluate(InputSource inputSource) { try { DocumentBuilder dbuilder = createDocumentBuilder(); Document doc = dbuilder.parse(inputSource); //An XPath expression could return a true or false value instead of a node. //eval() is a better way to determine the boolean value of the exp. //For compliance with legacy behavior where selecting an empty node returns true, //selectNodeIterator is attempted in case of a failure. CachedXPathAPI cachedXPathAPI = new CachedXPathAPI(); XObject result = cachedXPathAPI.eval(doc, xpath); if (result.bool()) return true; else { NodeIterator iterator = cachedXPathAPI.selectNodeIterator(doc, xpath); return (iterator.nextNode() != null); } } catch (Throwable e) { return false; } }
public String cachedXPathGetString(String xpath, String prefixMappings) throws Docx4JException { cachedXPathAPI = new CachedXPathAPI();
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected void initializeExpressionQuery() { this.xpath = new CachedXPathAPI(); }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }
protected CachedXPathAPI getXPathAPI() { CachedXPathAPI cachedXPathAPI = xpathAPI.get(); if (cachedXPathAPI == null) { cachedXPathAPI = new CachedXPathAPI(); xpathAPI.set(cachedXPathAPI); } return cachedXPathAPI; }