I have a Document (org.w3c.dom.Document), I convert this document to array of byte:
private byte[] obtenerBytesDeDocument(Document documentoXml) throws Excep
The following should work.
private Document obtenerDocumentDeByte(byte[] documentoXml) throws Exception {
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setNamespaceAware(true);
DocumentBuilder builder = factory.newDocumentBuilder();
return builder.parse(new ByteArrayInputStream(documentoXml));
}