SPONSORS:






User Tag List

Results 1 to 2 of 2
  1. #1
    Guest

    How to compare HTML files?

    Is somebody has a tool to compare 2 HTML files, more efficiently/understandable than SYS_CompareText or Binary?

    Thank you.


  2. #2
    Guest

    Re: How to compare HTML files?

    Depends what you mean by "compare"

    With most text formats, what I will normally do is keep a good difference analyzer around (WinDiff or the like). If the simple comparison doesn't match, I copy the two files to a safe area, and create an entry in the results file which will launch the analyzer on those files (see "raise statement" in the language reference). If you need to have the differences in the results file itself, you may be able to call your analyzer using SYS_Execute, copying the output into a list which you then print.

    But that's checking that two files are equal. If instead, you want to check that two files are equivalent... that's a lot harder. There exists a perl module for parsing HTML elements, so you could, I suppose, write a pl file to build an element tree, then check element by element to confirm that the files are "close enough"

    A compromise between the two might be to compare the actual results against a regular expression mask (again, using perl). This can get pretty squirrelly if you have to worry about equivalent sections that span different numbers of lines.

    Mr Cluey

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 12:44 PM.

Copyright BetaSoft Inc.