有没有任何工具来比较2个网页的结构? [英] Are there any tools out there to compare the structure of 2 web pages?
问题描述
我从创意团队收到HTML页面,然后使用这些页面来构建aspx页面。我经常遇到的一个挑战是获得HTML我吐出来与他们完全匹配。我几乎总是最终在我的页面和母版页之间找到嵌套的< div>
。
I receive HTML pages from our creative team, and then use those to build aspx pages. One challenge I frequently face is getting the HTML I spit out to match theirs exactly. I almost always end up screwing up the nesting of <div>
s between my page and the master pages.
lorem ipsum 等。
Does anyone know of a tool that will help in this situation -- something that will compare 2 pages and output the structural differences? I can't use a standard diff tool, because IDs change from what I receive from creative, text replaces lorem ipsum, etc..
推荐答案
您可以使用 HTMLTidy 将HTML转换为格式正确的XML因此,您可以按照Gulzar的建议使用 XML Diff 。
You can use HTMLTidy to convert the HTML to well-formed XML so you can use XML Diff, as Gulzar suggested.
tidy -asxml index.html
这篇关于有没有任何工具来比较2个网页的结构?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!