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.
我正在使用 SGML Reader 来格式化我的 html 片段,如下所示https://github.com/MindTouch/SGMLReader。问题是它在代码中添加了缺失的标签。有什么办法可以阻止它。
SgmlReader 旨在将源代码转换为有效的 HTML 文档。因此,它总是用 . 如果要删除某些标记,可以遍历 XML 文档并删除不需要的节点,或者仅将需要的节点复制到新的 XML 文档中。