String getIp(String xml) {
DocumentBuilderFactory builderFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = builderFactory.newDocumentBuilder();
XPath xpath = XPathFactory.newInstance().newXPath();
Document document = builder.parse(new InputSource(new StringReader(xml)));
expression = "/root/ip/text()";
return xpath.evaluate(expression, document, XPathConstants.STRING).toString();
}