Word to xml using C#?
-
I have found the need to convert a word document (its text, tables and images) to an XML file that could give a general layout like the world file. Firstly is there an easier way to do this other than programatic access to the Word object model? Secondly, if I do have to programatically accomplish this, I need to assign names to to the tables, images and text. Currently I'm trying either a caption or a bookmark, but there may be an easier way. By the way I'm using Word 2000 if that is of importance, and I am also using C#. Thanks.
-
I have found the need to convert a word document (its text, tables and images) to an XML file that could give a general layout like the world file. Firstly is there an easier way to do this other than programatic access to the Word object model? Secondly, if I do have to programatically accomplish this, I need to assign names to to the tables, images and text. Currently I'm trying either a caption or a bookmark, but there may be an easier way. By the way I'm using Word 2000 if that is of importance, and I am also using C#. Thanks.
One possible way to minimize use of the word object model would be to only invoke it to save the word doc in xml format, and then parse the MSxml into your format. If words xml output is as noxious as it's html it might end up being more work, I've never tried so I wouldn't know.