in reply to HTML Document Comparison
1. Read the document and strip off everything except the html tags, including all newlines;
2. Take the MD5 hash of the tag structure;
3. Compare the MD5s of the documents to determine if they have the same structure. Or are derived from the same template with different text.
Advantadges:
* Accounts for markup changes, so differences in the text are not significant;
* If you have a lot of documents, MD5s are easy and quick to compare, as opposed to whole documents.
Disadvantadges:
* Accounts for markup changes, so differences in the text are not significant;
* MD5s are very strict, so there's no telling between small and big differences.
Actually this isn't my idea, it was used in some web survey to count the number of unique sites on the net.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: HTML Document Comparison
by extremely (Priest) on Sep 14, 2000 at 03:39 UTC |