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

Free Support Forum - aspose.com

Convert word Document (.doc) to xml using .net

Hi,

Is Aspose.words the best way to convert .doc file (with custom styles) to a customised XML file?

Hi

Thanks for your request. Using Aspose.Words you can convert DOC file to WordML format (XML).

Document doc = new Document("in.doc");
doc.Save("out.xml");

Is that what you need?

In addition, you can use Aspose.Words document object model to create converter to any format.

Best regards.

Hi thanks for help,

I want to convert a word document

to a XML one.I want to define my own tags

What I need to convert doc file to xml format using a custom schema or DTD

Is-it possible to use aspose.words for this issue?

Thanks

Hi

Thanks for your inquiry. There is no direct way to achieve this. However, as I told you earlier, you can use Aspose.Words DOM to create any custom converter. Please follow the link to learn more about Aspose.Words DOM:

https://docs.aspose.com/words/net/aspose-words-document-object-model/

In addition, you can save document in WML (XML) format and use XSL transformation to convert it to any other XML schema.

Best regards.

I want to convert a word document to a XML one. I want to define my own tags.

So to do it you propose to use DOM. DOM can used with DocumentVisitor so

Is the DocumentVisitor can make the job? If yes is’it the best way?

Thanks

Hi

Thanks for your inquiry. Yes, I think DocumentVisitor is the best way to achieve this. The technique is demonstrated in the following article:

https://docs.aspose.com/words/net/how-to-extract-selected-content-between-nodes-in-a-document/

Hope this helps.

Best regards.