@Test(expected=Exception.class) public void setXmlToParseTest_passedEmptyStringThrowsException() throws SAXException, IOException, ParserConfigurationException { xPathEvaluator.setXmlToParse(""); }
public void setXmlToParse(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); documentFactory.setNamespaceAware(false); DocumentBuilder builder = documentFactory.newDocumentBuilder(); xmlDocument = builder.parse(new ByteArrayInputStream(xml.getBytes())); }
XmlXPathEvaluator implements Serializable { public void setXmlToParse(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); documentFactory.setNamespaceAware(false); DocumentBuilder builder = documentFactory.newDocumentBuilder(); xmlDocument = builder.parse(new ByteArrayInputStream(xml.getBytes())); } }
XmlXPathEvaluator implements Serializable { public void setXmlToParse(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); documentFactory.setNamespaceAware(false); DocumentBuilder builder = documentFactory.newDocumentBuilder(); xmlDocument = builder.parse(new ByteArrayInputStream(xml.getBytes())); } XmlXPathEvaluator(); }
XmlXPathEvaluator implements Serializable { public void setXmlToParse(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); documentFactory.setNamespaceAware(false); DocumentBuilder builder = documentFactory.newDocumentBuilder(); xmlDocument = builder.parse(new ByteArrayInputStream(xml.getBytes())); } XmlXPathEvaluator(); void setXmlToParse(String xml); String extractValue(String xPathString); }
XmlXPathEvaluator implements Serializable { public void setXmlToParse(String xml) throws SAXException, IOException, ParserConfigurationException { DocumentBuilderFactory documentFactory = DocumentBuilderFactory.newInstance(); documentFactory.setNamespaceAware(false); DocumentBuilder builder = documentFactory.newDocumentBuilder(); xmlDocument = builder.parse(new ByteArrayInputStream(xml.getBytes())); } XmlXPathEvaluator(); void setXmlToParse(String xml); String extractValue(String xPathString);  }