OdtToText2.java (Initial Version Committed)

The initial version of OdtToText2.java was committed to the CVS by Bernd Eilers. View the CVS log here

Features

  1. Extracts text, headings from a ODT file
  2. Uses the classes TextBody, BlockContent, Element, etc, in odf.text
  3. No manual SAX parsing

To Do’s

  1. Extend it to extract other information from a ODT file,like table information and etc.

    Test Run:

    • Input – ODT file containing simple text, a heading and List of elements
    • Output :

    DEBUG unhandled elem is org.openoffice.odf.text.UnknownElement node=office:forms
    DEBUG unhandled elem is org.openoffice.odf.text.UnknownElement node=text:sequence-decls
    He heard quiet steps behind him. That didn’t bode well. Who could be following him this late at night and in this deadbeat part of town? And at this particular moment, just after he pulled off the big time and was making off with the greenbacks. Was there another crook who’d had the same idea, and was now watching him and waiting for a chance to grab the fruit of his labor?

    *  aaa
    *  bbb
    *  ccc
    *  ddd
    *  eee
    *  ffff

    ==== Heading ====
    text below heading
    *  aaa
    *  bbb
    *  ccc
    *  ddd
    *  eee
    *  ffff

    One Response to “OdtToText2.java (Initial Version Committed)”

    1. Ali Reza Etezadi Says:

      Dear Amit Kumar

      I am going to use odf4j in order to extract table information and contents from an odt file. In this blog under the date May 21, 2007, you announced the addition of table manipulation class. I do not see any follow up to your works while I truly need it. If by any chance you have it ready, please let me know since I badly need it.

      Thank you in advance
      Ali Reza Etezadi, Sweden

    Leave a Reply