We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Convert docx to xml using Aspose

Hello,


Does anyone have a java example of converting docx to xml?

Im not sure how to get started.

Thank You in advance.


Hi there,

Thank you for your inquiry. Please note that Aspose.Words mimics the same behavior as MS Word does.

The FlatOpc saves the document as an Office Open XML WordprocessingML. You can also save the document to Microsoft Word 2003 WordprocessingML format using SaveFormat.WordML. Please check the following code examples for your kind reference.

com.aspose.words.Document doc = new com.aspose.words.Document(“Input.docx");

//To save the document to Office Open XML WordprocessingML format

doc.save("Output.xml", com.aspose.words.SaveFormat.FLAT_OPC);

//To save the document to Microsoft Word 2003 WordprocessingML format

//doc.save("Output.xml", com.aspose.words.SaveFormat.WORD_ML);


Please feel free to contact us for any further assistance.

Best Regards,