Why does en-dash (–) trigger illegal XML character error (C#/SSMS)?

后端 未结 4 559
星月不相逢
星月不相逢 2021-01-05 04:19

This is not a question on how to overcome the \"XML parsing: ... illegal xml character\" error, but about why it is happening? I know tha

4条回答
  •  -上瘾入骨i
    2021-01-05 04:50

    The MSDN guidelines says:

    SQLXML 4.0 relies upon the limited support for DTDs provided in SQL Server. SQL Server allows for an internal DTD in xml data type data, which can be used to supply default values and to replace entity references with their expanded contents. SQLXML passes the XML data "as is" (including the internal DTD) to the server. You can convert DTDs to XML Schema (XSD) documents using third-party tools, and load the data with inline XSD schemas into the database.

提交回复
热议问题