XML file keeps changing, how can I detect changes? What values/nodes were changed and get new values?
-
I'm watching changes in an XML file which keeps on updating every less than a second or more. Updates are being done by an external service. Is there a way to detect the changes on this XML file and make a java function that will return what node was changed and what's the new value of the particular changed node? Thank you for the help.
-
Answer:
For watching the actual FILE change you could use NIO.2 (java 7) http://blogs.oracle.com/thejavatutorials/entry/watching_a_directory_for_changes After each change you can compare the old XML against the new one. Tools for diffing xml you can find here: http://www.manageability.org/blog/stuff/open-source-xml-diff-in-java
prokaryote at Stack Overflow Visit the source
Other answers
I have not tried this extension but may be the version extension of the XML-DB eXist can help you with your requirement. http://exist.sourceforge.net/versioning.html Though to use this you are required to store the changed documents in the DB each.
Gandalf
Related Q & A:
- How can I concentrate on what I have to do right now?Best solution by Yahoo! Answers
- How can i keep my speakers on my scraper bike from get wet in the rain?Best solution by Yahoo! Answers
- How can I find out what is on this small recorded tape I have?Best solution by Yahoo! Answers
- How can I find out what tax code I'm on?Best solution by Yahoo! Answers
- How can i convert a game on my old pc to my new pc?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.