0

I am creating an Android App (in eclipse) which I need to create a document - a letter. I'm writing it i xml and I have been able to produce .xml and .doc both of which MSWord will happily open, which is fantatsic but I really need also to be able to open it in the standard Android document readers, such as Kingsoft Office/QuickOffice/OfficePro etc. Unfortunately, these Apps all open it as the xml source which is a hassle to read and edit. The web-based Google document reader also has issues with my docs.

I must be missing something in my markup and I was just wondering if anyone out there knew the markup needed for my Word document (.doc) to be exactly that and thus parse-able by doc readers?

Thanks

Dmitry Pavliv
  • 35,333
  • 13
  • 79
  • 80
xhedgepigx
  • 340
  • 1
  • 2
  • 19
  • Maybe just the extension? If your XML is WordML, in an OPC package, the file extension should be docx, not doc, which is for the old binary format. But I'm sure you knew that! – JasonPlutext Jul 11 '12 at 21:09

1 Answers1

0

.doc files are not XML and won't display as XML. If you are seeing XML then the file is not really a .doc format (even if you are naming it with a .doc extension). If you need to produce .doc format (not just docx) then you have a much harder task. The only thing I can suggest for Android is calling a service like Docmosis that can produce a PDF/DOC etc for you - but it's not free and you need to be connected. For viewing documents on various platforms a possibly better approach is to always display PDF and only use formats like .doc/.docx where editing is required/expected.

Paul Jowett
  • 6,513
  • 2
  • 24
  • 19