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

Free Support Forum - aspose.com

Style are lost after XML to DOCX conversion using C#

Hi Team,
we have converting xml document to docx document using Aspose word , Style not loading in converted document.

We have using below the sample coding:

Aspose.Words.License license1 = new Aspose.Words.License();
license1.SetLicense(“Aspose.Total.lic”);
Aspose.Words.Document doc1 = new Aspose.Words.Document(@“D:\FileTest\XML Document.xml”);
doc1.Save(@“D:\FileTest\ConvertedDOC.docx”, Aspose.Words.SaveFormat.Docx);

Please find the attachment for your reference.
Main XML Document screenshot: XML Document.png (113.1 KB)

Converted document screenshots: ConvertedDOC.png (113.3 KB)

Sample Documents(XML and Converted Document): Sample Document.zip (50.5 KB)

@thiru1711

We have tested the scenario using the latest version of Aspose.Words for .NET 20.1
and have not found the shared issue. So, please use Aspose.Words for .NET 20.1. We have attached the output DOCX with this post for your kind reference.20.1.zip (19.8 KB)

Hi @tahir.manzoor,
Thanks , its working.