Alex Rivera | Logout

Best Way to Process a Word Document

Asked 2010-11-24T02:08:59.493
12

I receive word documents with specified formating corresponding to the data that is in them. For example, all headers have the exact same formating (Times New Roman-Font 14-Bold).

What is the best way to process such MS Word documents (.doc or .docx) into xml documents? Language is not an issue (I'll use Lisp/Boost.Spirit if I have to!).

Edit
Report

2 Answers

2

Used a very inefficient conditional search in VBA to literally copy the document into a second document. The second document was then saved with a .xml extension. Got the job done, but its ugly.

answered 2011-05-25T19:51:28.017
1

You can also try Java based Apache POI - HWPF. It supports text extraction. You will then have to create you own XML doc, Caster XML or Xstream can help you on that issue.

answered 2010-11-24T05:02:35.800

Your Answer