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


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


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

Document doc = new Document("in.doc");

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 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:
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 for your inquiry. Yes, I think DocumentVisitor is the best way to achieve this. The technique is demonstrated in the following article:
Hope this helps.
Best regards.