Suggestions on how build an HTML Diff tool?

前端 未结 16 2104
灰色年华
灰色年华 2021-02-02 02:00

In this post I asked if there were any tools that compare the structure (not actual content) of 2 HTML pages. I ask because I receive HTML templates from our designers, and freq

16条回答
  •  南旧
    南旧 (楼主)
    2021-02-02 02:14

    This has been an excellent start. A few more clarifications/comments:

    • I probably don't care about IDs, since .net will mangle them
    • some of the structure will be in a repeater or other such control, so I might end up having more or fewer repeating elements

    further thought: I think a good start would be to assume the html is XHTML compliant. I could then infer the schema (using the new .net XmlSchemaInference methods), then diff the schemata. I can then look at the differences and consider whether or not they're significant.

提交回复
热议问题