问题
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