Nuno Rocha wrote:
> Hi,
>
Hi Nuno,
> I need something to allow me to manipulate ODT files in
java. I found this
> great project and already downloaded the code, but if
someone could tell me
> what are the main capabilities in terms of ODT
documents I would really
> appreciate. I've already went through the code and I
think that in this
> moment the most advanced part of the project is the
manipulation of the
> archive file itself and there is a little bit of ODS
creation fixtures. No
> ODT specific things...
You are right for text documents there´s currently not much
there.
Contributions are welcome
>
> Right now, can I read, search, edit and re-save ODT
documents?
>
read:
TextDocument
txtdoc=(TextDocument)OpenDocumentFactory.load(file);
searching and changing:
org.w3c.dom.Document
content=txtdoc.getDocument("content.xml")
org.w3c.dom.Document
styles=txtdoc.getDocument("styles.xml")
and than you can manipulate or search on the DOM trees.
save:
txtdoc.save("test.odt");
Another method of manipulating txt files available is using
XSL-Transformations you can use the OdfXMLHelper class for
applying such.
> Regards,
> Nuno
>
Regards,
Bernd Eilers
------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribe odftoolkit.openoffice.org
For additional commands, e-mail: dev-help odftoolkit.openoffice.org
|