try {
DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = domFactory.newDocumentBuilder();
StringReader reader = new StringReader(error);
Document doc = builder.parse(new InputSource(reader));
XPathFactory factory = XPathFactory.newInstance();
XPath xpath = factory.newXPath();
String method = (String) xpath
.evaluate("/Error/@Method", doc, XPathConstants.STRING);
String calaisRequestID = (String) xpath
.evaluate("/Error/@calaisRequestID", doc, XPathConstants.STRING);
String creationDate = (String) xpath