Jsoup behavior when any HTML end tag is missing
What would be the default behavior of Jsoup wheneve开发者_StackOverflow中文版r 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?
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.
精彩评论