Jsoup behavior when any HTML end tag is missing

淺唱寂寞╮ 提交于 2020-01-15 06:57:05

问题


What would be the default behavior of Jsoup whenever there is one missing HTML tag(either start tag or end tag)? Will it throw an error or would it ignore the existing tag or remove the existing tag?


回答1:


When the end tag is missing, Jsoup will try doing its best and add it at the most sensible place conform the HTML5 spec. When the start tag is missing, Jsoup will remove the end tag.



来源:https://stackoverflow.com/questions/6931799/jsoup-behavior-when-any-html-end-tag-is-missing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!