I use parseFromString() to create elements. Each element is individual and should be inserted into the DOM later.
This works fine, except for this string:
<tr> <td>a</td> </tr> <div>X</div>
How to parse the <tr> and <div> so that I have a list of two elements?
Update
I know that I could parse this easily:
<table><tr> <td>a</td> </tr></table> <div>X</div>
But in this case I really would like to parse <tr>...</tr> <div>..</div>.
from Make parseFromString() parse without validation

No comments:
Post a Comment