Hi friends,
I have to compare two documents in java.Basically i am generating the document in the HTML format can there is a way that can compare this thing.
Below is the small code which is generated on the jsp page.
Consider the ex.
Suppose i have a document 1 which is generate over the jsp page when i call it. Now i make some changes in the document 1 and save it. Now when i generate the modified document
i need a way that can highlight the portion that are changed.
As we can do with the help of the compare tools.
In that case you can open streams to the two documents, read them one line at a time and compare the lines.
If you are using Swing, you can use the javax.swing.text.Highlighter to highlight the differences