Oracle Error OCI-31072: Too many child nodes in XMLType fragment for updateXML

Oracle Error Message

OCI-31072: Too many child nodes in XMLType fragment for updateXML

Reason for the Error

An attempt was made to pass an XMLType fragment with multiple children as new data for the updateXML operator.

Solution

Extract the desired child from the XMLType before passing it to updateXML as the desired new XML node.