I have small Strings with XML, like:
String myxml = \"good hi \";
<
XPath using Java 1.5 and above, without external dependencies:
String xml = "good hi ";
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xpath = xpathFactory.newXPath();
InputSource source = new InputSource(new StringReader(xml));
String status = xpath.evaluate("/resp/status", source);
System.out.println("satus=" + status);