I need to prepend HTML to existed XOM element. HTML represented as a String.
Here are my actions
- Parse String into XOM Document
- Remove root element(X) from Document
- Prepend X to desired target element (Y)
I get an exception
nu.xom.WellformednessException: Cannot remove the root element
at nu.xom.Document.removeChild(Unknown Source)
at nu.xom.Node.detach(Unknown Source)
X element HTML
<div>
Some test text
</div>