Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / Tools / April 2004

Tip: Looking for answers? Try searching our database.

read openOffice files with java?

Thread view: 
wEEdpEckEr - 27 Apr 2004 23:59 GMT
Hi,

first of all, sorry if this is the wrong group, please redirect me to a
more appropiate one.

Here's the problem: I have to read an openOffice text document in Java, and
convert it to a regular xml-document. I have heard that openOffice uses xml
for it's internal structure, but I'm not quite sure. Anyway's, I've tried
to open such a document, in a regular editor (notepad) and in a hex editor
(ultra editor) but none of them can reveal more about the internal
structure. Is there a way to let java read directly from such a file?

Thanks in advance.
<T!M> aka wEEdpEckEr
Crazy Photon - 28 Apr 2004 04:23 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> hex editor (ultra editor) but none of them can reveal more about the
> internal structure.

That's because .sxw files are zip files which have the .xml files inside.

> Is there a way to let java read directly from such a file?

Use the java.util.zip.ZipFile class which comes with the JDK to access
the .sxw contents and then use an XML parser...

I think OpenOffice has a Java API for working with its files but I have no
experience in that so I cannot be of any help but you should try looking
for that first.

Greetings,

Crazy Photon

Signature

Resistance is NEVER futile... except for you!

Crazy Photon - 28 Apr 2004 04:30 GMT
> I think OpenOffice has a Java API for working with its files but I have no
> experience in that so I cannot be of any help but you should try looking
> for that first.

See http://api.openoffice.org, this should help in your task.

HTH,

Crazy Photon

Signature

Resistance is NEVER futile... except for you!

wEEdpEckEr - 28 Apr 2004 19:23 GMT
> See http://api.openoffice.org, this should help in your task.

Thanks for the information, I will surely take a look at it.

greetings
<T!M> aka wEEdpEckEr


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.