@Test public void testGetAttributeText() throws Exception { Document document = getBasicDocument(); Node subNode = (Node) xmlUtils.getxPath().evaluate("./sample/subnode", document, XPathConstants.NODE); Assert.assertEquals(xmlUtils.getAttributeText(subNode, SUBNODE_ATTRIB_NAME), SUBNODE_ATTRIB_VALUE); }
@Override public String getAttributeText(Node node, String attribute) throws XPathExpressionException { return (String) xPath.evaluate("./@" + attribute, node, XPathConstants.STRING); }
XmlUtilsImpl implements XmlUtils { @Override public String getAttributeText(Node node, String attribute) throws XPathExpressionException { return (String) xPath.evaluate("./@" + attribute, node, XPathConstants.STRING); } }
XmlUtilsImpl implements XmlUtils { @Override public String getAttributeText(Node node, String attribute) throws XPathExpressionException { return (String) xPath.evaluate("./@" + attribute, node, XPathConstants.STRING); }  }
XmlUtilsImpl implements XmlUtils { @Override public String getAttributeText(Node node, String attribute) throws XPathExpressionException { return (String) xPath.evaluate("./@" + attribute, node, XPathConstants.STRING); }  @Override String getDocumentXmlString(Document document); @Override Document createDocument(String rootElementName); @Override Document getDocumentFromString(String inputXml); @Override Node getOrCreateChildNode(String tagName, Node parentNode); @Override String getSubNodeText(Node parentNode, String subNodeName, boolean allowNone); @Override String getPathNodeText(Node parentNode, String path, boolean allowNone); @Override void setSubNodeText(Node filterNode, String subNodeName, String newValue); @Override String getAttributeText(Node node, String attribute); @Override Node appendChildNode(Node parentNode, String nodeName, String nodeValue); @Override String getNodeXmlString(Node node); @Override XPath getxPath(); XmlUtilsImpl setxPath(XPath xPath); }
XmlUtilsImpl implements XmlUtils { @Override public String getAttributeText(Node node, String attribute) throws XPathExpressionException { return (String) xPath.evaluate("./@" + attribute, node, XPathConstants.STRING); }  @Override String getDocumentXmlString(Document document); @Override Document createDocument(String rootElementName); @Override Document getDocumentFromString(String inputXml); @Override Node getOrCreateChildNode(String tagName, Node parentNode); @Override String getSubNodeText(Node parentNode, String subNodeName, boolean allowNone); @Override String getPathNodeText(Node parentNode, String path, boolean allowNone); @Override void setSubNodeText(Node filterNode, String subNodeName, String newValue); @Override String getAttributeText(Node node, String attribute); @Override Node appendChildNode(Node parentNode, String nodeName, String nodeValue); @Override String getNodeXmlString(Node node); @Override XPath getxPath(); XmlUtilsImpl setxPath(XPath xPath);  }