Oracle Error ORA-19010: Cannot insert XML fragments

Oracle Error Message

ORA-19010: Cannot insert XML fragments

Reason for the Error

XML fragments got from extractNode cannot be inserted into the database.

Solution

Convert the fragment into a proper XML document before insertion.