@Test public void testGetNode() throws XPathExpressionException { String xPath = "/hl7:ClinicalDocument Node node = sut.getNode(c32Doc, xPath); assertNotNull(node); assertEquals("CityName", node.getTextContent()); }
@Override public Node getNode(Document xmlDocument, String xPathExpr, String... arguments) throws DocumentAccessorException { xPathExpr = setXpathArguments(xPathExpr, arguments); final XPath xpath = xpath(); Node node; try { node = (Node) xpath.evaluate(xPathExpr, xmlDocument, XPathConstants.NODE); } catch (final XPathExpressionException e) { throw new DocumentAccessorException(e); } return node; }
DocumentAccessorImpl implements DocumentAccessor { @Override public Node getNode(Document xmlDocument, String xPathExpr, String... arguments) throws DocumentAccessorException { xPathExpr = setXpathArguments(xPathExpr, arguments); final XPath xpath = xpath(); Node node; try { node = (Node) xpath.evaluate(xPathExpr, xmlDocument, XPathConstants.NODE); } catch (final XPathExpressionException e) { throw new DocumentAccessorException(e); } return node; } }
DocumentAccessorImpl implements DocumentAccessor { @Override public Node getNode(Document xmlDocument, String xPathExpr, String... arguments) throws DocumentAccessorException { xPathExpr = setXpathArguments(xPathExpr, arguments); final XPath xpath = xpath(); Node node; try { node = (Node) xpath.evaluate(xPathExpr, xmlDocument, XPathConstants.NODE); } catch (final XPathExpressionException e) { throw new DocumentAccessorException(e); } return node; }  }
DocumentAccessorImpl implements DocumentAccessor { @Override public Node getNode(Document xmlDocument, String xPathExpr, String... arguments) throws DocumentAccessorException { xPathExpr = setXpathArguments(xPathExpr, arguments); final XPath xpath = xpath(); Node node; try { node = (Node) xpath.evaluate(xPathExpr, xmlDocument, XPathConstants.NODE); } catch (final XPathExpressionException e) { throw new DocumentAccessorException(e); } return node; }  @SuppressWarnings("unchecked") @Override Document addingStylesheet(Document doc,
			String xslHref); @Override Element getElement(Document xmlDocument, String xPathExpr,
			String... arguments); @Override Node getNode(Document xmlDocument, String xPathExpr,
			String... arguments); @Override NodeList getNodeList(Document xmlDocument, String xPathExpr,
			String... arguments); @Override ProcessingInstruction getProcessingInstruction(Document xmlDocument,
			String xPathExpr, String... arguments); }
DocumentAccessorImpl implements DocumentAccessor { @Override public Node getNode(Document xmlDocument, String xPathExpr, String... arguments) throws DocumentAccessorException { xPathExpr = setXpathArguments(xPathExpr, arguments); final XPath xpath = xpath(); Node node; try { node = (Node) xpath.evaluate(xPathExpr, xmlDocument, XPathConstants.NODE); } catch (final XPathExpressionException e) { throw new DocumentAccessorException(e); } return node; }  @SuppressWarnings("unchecked") @Override Document addingStylesheet(Document doc,
			String xslHref); @Override Element getElement(Document xmlDocument, String xPathExpr,
			String... arguments); @Override Node getNode(Document xmlDocument, String xPathExpr,
			String... arguments); @Override NodeList getNodeList(Document xmlDocument, String xPathExpr,
			String... arguments); @Override ProcessingInstruction getProcessingInstruction(Document xmlDocument,
			String xPathExpr, String... arguments);  }