Hi,
Please find the attached word2003xml document(Sample.xml)
When I try to load the document as Aspose wordml document. I am getting document corruption exception.
Code Used to load aspose document:
loadOptions.setLoadFormat(LoadFormat.WORD_ML);
Path path = Paths.get(“C:/temp/short_wrong.xml”);
byte[] docx = Files.readAllBytes(path);
Document wordmlDocument = new Document(
new ByteArrayInputStream(docx), loadOptions);
Exception:
Exception in thread “main” com.aspose.words.FileCorruptedException: The document appears to be corrupted and cannot be loaded.
at com.aspose.words.FileFormatUtil.zzZ(Unknown Source)
at com.aspose.words.Document.zzY(Unknown Source)
at com.aspose.words.Document.zzZ(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.aspose.words.Document.(Unknown Source)
at com.mckesson.mhs.cm.language.AsposeWordUtil.main(AsposeWordUtil.java:1339)
Caused by: java.lang.IllegalArgumentException: The reference node is not a child of this node.
Please let me know what’s the issue with this document
Thanks,
Muthulakshmi.M