Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.
Mon Jan 23, 2017 8:57 pm
I get a null reference exception whenever I try to load an xml file using Spire.Doc in C#. The code is below and an xml file is attached. I appreciate any ideas.
- Code: Select all
Document xmlDocument = new Document();
MemoryStream mXml = new MemoryStream();
// This line throws an error
xmlDocument.LoadFromFile(@"C:\Test.xml", Spire.Doc.FileFormat.Xml);
SaveToStream(mXml, Spire.Doc.FileFormat.PDF);
new PdfDocument(mXml);
Login to view the files attached to this post.
-
RobinsonTo
-
- Posts: 1
- Joined: Mon Jan 23, 2017 8:51 pm
Tue Jan 24, 2017 4:04 am
Hi Tomy,
Thanks for your inquiry.
Please kindly notice that Spire.Doc only supports loading Office OpenXML.
Sorry for the inconvenience caused.
If any questions, please don't hesitate to contact us.
Sincerely,
Simon
E-iceblue support team
-
Simon.yang
-
- Posts: 620
- Joined: Wed Jan 11, 2017 2:03 am