I have a xml string with declaration such:
N'<?xml version="1.0" encoding="utf-16"?>
<ParentNode xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ChildNodes>
<Node1>106637.5</Node1>
<Node2>4</Node2>
</ChildNodes>
</ParentNode>'
I had successfully insert to MSSQL database, but it seems sql server automatic trims off the xml declaration (<?xml version="1.0" encoding="utf-16"?>).
How can I force sql server to insert above xml string with full declaration ?
It is not possible. Limitations of the xml Data Type