Searching Docx files in java

主宰稳场 提交于 2019-12-12 05:37:55

问题


I am writing an application for searching the Content of Documents i have already written the code for searching the documents which are editable by notepad.

I also wish to do the same for docx files. After some research i have come up with these two things

  1. http://www.infoq.com/articles/cracking-office-2007-with-java this method requires me to extract docx file and then search the xml files however this would involve an extra overhead on the extraction part and frankly i dont know how to process an xml file ( discarding attribute content etc)

  2. http://www.javadocx.com/download this method allows me to import a jar library to my project and supposedly i can create docx files with it, what i dont understand is how to open docx files using it

can anyone recommend me a alternate method to perform the same action or help with the above two mentioned methods?


回答1:


Try http://tika.apache.org/ or docx4j or POI.



来源:https://stackoverflow.com/questions/6608071/searching-docx-files-in-java

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!