SQL Server Error - Msg 9412, Level 16, State 1

We will get this error when we are trying to query XML in SQL Server. If that XML is invalid, Say for example if the closing tag ">" is missed in the input XML

Below error message will be throwed :

Msg 9412, Level 16, State 1, Line 1
XML parsing: line 6, character 5, '>' expected

To resolve the error:




Check if the XML tags are properly enclosed to fix / avoid this error.

  Note: This error can also be encountered under various other scenarios. I will keep updating this article.

SELECT * FROM Sys.messages WHERE language_id = 1033 AND message_id = 9412

See Also:

No comments: