public Element readXML(DataInput in) throws IOException {
        try {
            return SAXReaderUtil.readRootElement(readSafeUTF(in));
        } catch(ExecutionException | InterruptedException e) {
            throw new IOException("Unable to parse data as XML", e);
        }
    }
Reads an XML element from the input stream.
@param in The input stream
@return An XML element.
@throws IOException if an error occurs.
xmppserver/src/main/java/org/jivesoftware/util/cache/ExternalizableUtil.java