This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Java in General and the fly likes reading data from xml file asynchronously Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » Java in General
Reply locked New topic

reading data from xml file asynchronously

Rajesh Kumar

Joined: Oct 21, 2002
Posts: 10
I have a xml file and would like to read data from the xml file every 10 seconds. I want to run this process once in every 10 seconds as this file is updated freqently.
please note that the daemon thread which reads the xml data should run continously for ever.
Can I implement the process using java.util.Timer?
Any sample code and suggestions would be of great help as I'm new to Java.
Thanks in Advance,
Marilyn de Queiroz

Joined: Jul 22, 2000
Posts: 9055
Please do not cross-post.

"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
I agree. Here's the link:
subject: reading data from xml file asynchronously