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

Free Support Forum - aspose.com

XML document without line feeds

While trying to create a new Word object from a xml stream I get the following error message:

Aspose.Words.UnsupportedFileFormatException: Unknown file format.
at Aspose.Words.Document.x5d4db34d48fb3129(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)
at Aspose.Words.Document.x5d95f5f98c940295(Stream xcf18e5243f8d5fd3, LoadOptions x27aceb70372bde46)
at Aspose.Words.Document..ctor(Stream stream, LoadOptions loadOptions)

I have spent some time trying to diagnose what was causing this error and have determined it is related to xml documents without line feeds. Besides preformatting the data before creating a stream from it is there any other way to prevent this error from happening?


Thanks for your inquiry.

I am afraid, you can not open a simple XML file using Aspose.Words component. However, Aspose.Words provides exhaustive support for different XML-based formats for word processing documents e.g. OOXML, Flat OPC and also Word 2003 XML. For more details, please visit the following link:

Could you please also attach your input document here for testing? I will investigate the issue on my side and provide you more information.

Best regards,