@Test public void testSingleMatchingRegexp_WithDocumentBuilderFactory() throws Exception { XpathSyntaxIdentifier ident = createIdentifier(); ident.setXmlDocumentFactoryConfig(DocumentBuilderFactoryBuilder.newInstance()); ident.addPattern(MATCHING_1); assertTrue("Xpath matches", ident.isThisSyntax(readInput(INPUT_FILE))); }
@Override public boolean isThisSyntax(String message) throws ServiceException { try { Document d = createDocument(message); if (d == null) { return false; } XPath xp = createXPath(); for (String xpath : getPatterns()) { if (isEmpty(xp.selectSingleTextItem(d, xpath))) { return false; } } } catch (Exception e) { throw new ServiceException(e); } return true; }
XpathSyntaxIdentifier extends XmlSyntaxIdentifierImpl { @Override public boolean isThisSyntax(String message) throws ServiceException { try { Document d = createDocument(message); if (d == null) { return false; } XPath xp = createXPath(); for (String xpath : getPatterns()) { if (isEmpty(xp.selectSingleTextItem(d, xpath))) { return false; } } } catch (Exception e) { throw new ServiceException(e); } return true; } }
XpathSyntaxIdentifier extends XmlSyntaxIdentifierImpl { @Override public boolean isThisSyntax(String message) throws ServiceException { try { Document d = createDocument(message); if (d == null) { return false; } XPath xp = createXPath(); for (String xpath : getPatterns()) { if (isEmpty(xp.selectSingleTextItem(d, xpath))) { return false; } } } catch (Exception e) { throw new ServiceException(e); } return true; } XpathSyntaxIdentifier();  XpathSyntaxIdentifier(List<String> xpaths, String dest); }
XpathSyntaxIdentifier extends XmlSyntaxIdentifierImpl { @Override public boolean isThisSyntax(String message) throws ServiceException { try { Document d = createDocument(message); if (d == null) { return false; } XPath xp = createXPath(); for (String xpath : getPatterns()) { if (isEmpty(xp.selectSingleTextItem(d, xpath))) { return false; } } } catch (Exception e) { throw new ServiceException(e); } return true; } XpathSyntaxIdentifier();  XpathSyntaxIdentifier(List<String> xpaths, String dest); @Override boolean isThisSyntax(String message); }
XpathSyntaxIdentifier extends XmlSyntaxIdentifierImpl { @Override public boolean isThisSyntax(String message) throws ServiceException { try { Document d = createDocument(message); if (d == null) { return false; } XPath xp = createXPath(); for (String xpath : getPatterns()) { if (isEmpty(xp.selectSingleTextItem(d, xpath))) { return false; } } } catch (Exception e) { throw new ServiceException(e); } return true; } XpathSyntaxIdentifier();  XpathSyntaxIdentifier(List<String> xpaths, String dest); @Override boolean isThisSyntax(String message);  }