/***** * Parse an XML document stored in a payload * * @param payload holding the document * @return Document object after parsing */ public Document getXmlDocument(Payload payload) { try { Document doc = getXmlDocument(payload.open()); payload.close(); return doc; } catch (StorageException ex) { log.error("Failed to access payload", ex); } return null; }