How to Convert doc to xml using aspose java api

Hi, I am trying to find out how I can convert a word document into xml document using aspose framework. I could not find any examples online. Please let me know.


Hi Shahriar,

Thanks for your inquiry. WordprocessingML or WordML is a name for a family of XML-based formats for word processing documents. Please use following code example to convert Word document into WordML and use latest version of Aspose.Words for Java 15.12.0.

Hope this helps you. Please let us know if you have any more queries.

// Load the document
Document document = new Document(MyDir + "in.docx");
// Save the document + "Out.xml", SaveFormat.WORD_ML);