How to parse a MS word file from JAVA

How do i read the contents of MS word file in java? I know that FileInputStream can be used to read the contents in bytes but i need to parse the content of the file also so any pointers on this would be helpful for me.

I have tried out the API given out by POI by apache but i am not able to figure any thing out of that so it would be very helpful if some posts a sample code for the above problem.

[413 byte] By [Shankar_24684a] at [2007-11-26 19:57:14]
# 1
Save the word file in XML format and use one of the XML technologies to parse it: http://java.sun.com/webservices/jaxp/learning/tutorial/index.html
DrLaszloJamfa at 2007-7-9 22:51:49 > top of Java-index,Java Essentials,New To Java...
# 2

> but i am not able to figure any thing out of that

Use XML, as DrLJ just proposed. But be warned that if you are going to be dealing with Word documents you will have to spend some time learning how they are formatted, even the XML versions. Don't expect to just throw down a FileInputStream and have things happen automagically. It's a complicated format.

DrClapa at 2007-7-9 22:51:49 > top of Java-index,Java Essentials,New To Java...
# 3
Will i be able to get details of information stored in table of MS word if i convert MS word file to XML file and parse it ?Anyways it seems a good alternative will check it. Please let me know if we are having any commands to check the underlying format of the MS word file
Shankar_24684a at 2007-7-9 22:51:49 > top of Java-index,Java Essentials,New To Java...