You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Jsoup.parseBodyFragment will remove elements, if they miss a required parent
- when parsing fragments, such parents are often missing, for example <tr> requires <tbody>, which requires <table>
- the FragmentParser object provides the parseFragment method, which automatically provides the correct context, based on the first element in the fragment
- some elements require explicit wrapping, before parsing (i.e. <rp> and <rt>)
- fixes#98
Some elements, like
tr
ortd
are not allowed as direct children ofbody
. They requiretable
as their parent.Imagine the document is
Then
Will fail, because the outerHtml of every
<tr>
is parsed with Jsoup, which will remove<tr>
if it is not within a<table>
The text was updated successfully, but these errors were encountered: