Hi,
com.aspose.words.LoadOptions loadOptions = new LoadOptions();
loadOptions.setLoadFormat(LoadFormat.WORD_ML);
Document asposeDoc = new Document(new ByteArrayInputStream(wordML.getBytes()), loadOptions);
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
asposeDoc.save(outStream, DOCX_SAVEFORMAT);
// data bytes and wrap into an input stream.
ByteArrayInputStream inStream = new ByteArrayInputStream(outStream.toByteArray());
byte[] bytes = IOUtils.toByteArray(inStream);
// close all streams
outStream.flush();
outStream.close();
inStream.close();
// return
return bytes;