This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

transform .odt to .txt in java  RSS feed

 
Eduardo Ewerton
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello guys... i'm getting in java, and i have a litle problem.
I have to trasnform files .odt in files .txt in java.
If somebody have any idea... please post here!!

thank you all!
 
Rob Spoor
Sheriff
Posts: 21092
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can start OpenOffice.org in server mode, then call its methods from Java. Check out the OOo documentation and tutorials on how to.
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ODF files are ZIP files that contain various XML files; the actual content is in "content.xml". If the text is all you're interested in, unzip the file, parse the XML, and extract the pieces you're interested in (looking at it, it should be pretty obvious which ones those are).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!