Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我们如何编写 html 整洁编码仅用于在缺少结束标签的 html 文件中插入结束标签?
我正在使用 Html Agilitiy Pack 解析 html 表格信息。但是在缺少结束标签的地方,使用 html 敏捷包提取信息的性能不佳。如果我们手动编写结束标签,然后我们可以使用 html 敏捷包完美地提取信息。所以我想在它们丢失的地方插入结束标签,以便 html 敏捷包完美地提取信息。
请参阅接受的答案:
如果 Html 文件没有结束“/tr”标记或“/td”标记,则 HTML 敏捷包无法完美读取该信息
整洁 --hide-endtags=false
看起来你需要一些正则表达式。