如何配置 Nekohtml html 解析器将
进入
>

发布于 2024-10-07 18:14:16 字数 144 浏览 0 评论 0原文

我正在评估其他 Java HTML 解析器中的 Nekothml 解析器,并尝试让它用
元素替换我的所有
元素。这可以使用 Nekohtml API 来完成吗? 如有任何反馈,我们将不胜感激。 谢谢。

I'm evaluating the Nekothml parser among other Java HTML parsers, and I'm trying to make it replace all my <br> with <br /> elements. Can this be done using the Nekohtml API?
Any feedback is appreciated.
Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

盗梦空间 2024-10-14 18:14:16

nekohtml 解析器是一个解析器。它生成 DOM 树或 SAX 事件,全部在内存中,而不是文本。如果您配置正确,它将读取 html
就好像它是一个空的 XML 元素,任何 XML 序列化都会生成

The nekohtml parser is a parser. It produces a DOM tree or SAX events, all in memory, not text. If you have configured it properly, it will read the html <br> as if it were an empty XML element, and any XML serialization will them produce <br/>.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文