我有大量的 XML 数据存储在 NTEXT 和 NVARCHAR(MAX) 字段中。我需要解析这些数据。但我无法使用 CAST 或 CONVERT 函数来做到这一点。这是我收到的错误消息:Msg 9400, Level 16, State 1, Line 1 XML parsing: line 1, character 30000, unexpected end of input
Example of my XML data in DB (almost 64K characters): PT0S00000000-0000-0000-0000-000000000000PT0SfalsefirstNameEz00000000-0000-0000-0000-000000000000PT0SfalselastName1Elum0d3f106d-cf33-4562-b722-625acec9dc02a2e20551-8c98-48dc-8342-b5516a8583f40001-01-01T00 :00:00P90D00000000-0000-0000-0000-000000000000PT0SfalseemailAddressez@elum.com00000000-0000-0000-0000-000000000000PT0SfalseconfirmEmailAddressez@elum.com00000000-0000-0000-0000-000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalsee501dc4b-98df-4569-bb75 -9ffd9afe6ce81f14a091-1309-4316-bc6c-2dc45cd8e2650001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalseaddressLine1Data Data Data00000000-0000-0000-0000-000000000000PT0SfalseaddressLine2Data Data Data00000000-0000-0000-0000-000000000000PT0SfalseaddressLine3Data Data Data00000000-0000-0000-0000-000000000000PT0SfalsecityPhoenix00000000-0000- 0000-0000-000000000000PT0SfalseregionId99300000000-0000-0000-0000-000000000000PT0SfalsepostalCode6541200000000-0000-0000-0000-000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse00000000-0000-0000-0000-000000000000PT0SfalseregionArizona9f43b5e1-2043-4644-871e-5619f255debedeedf743-e9fd-414f- 922c-2770be87d87e0001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsedepartmentNameData Data Data00000000-0000-0000-0000-000000000000PT0SfalsejobTitleData Data Data00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalseaddressLine1Data Data Data00000000-0000-0000-0000-000000000000PT0SfalseaddressLine2Data Data Data00000000- 0000-0000-0000-000000000000PT0SfalseaddressLine3Data 数据Data00000000-0000-0000-0000-000000000000PT0SfalsecityPhoenix00000000-0000-0000-0000-000000000000PT0SfalseregionId99300000000-0000-0000-0000-000000000000PT0SfalsepostalCode6541200000000-0000-0000-0000-000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse00000000-0000-0000-0000-000000000000PT0SfalseregionArizona1c76ee4e- aa64-4441-9dea-cd7fea056e317d5d2708-d09b-48cb-a168-e9eabee535fb0001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalsecountryDialingCode+100000000-0000-0000-0000-000000000000PT0SfalseareaCode00000000-0000-0000-0000-000000000000PT0Sfalsenumber00000000-0000-0000-0000-000000000000PT0SfalsettyStatusFalsefalse00000000-0000-0000-0000- 000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse6e3c00b1-97bc-4477-98d8-b383d8b37ebe7af5e0ca-fc1d-4177-a735-9bd2a9af22b60001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalsecountryDialingCode+100000000-0000-0000-0000-000000000000PT0SfalseareaCode23400000000-0000-0000-0000-000000000000PT0Sfalsenumber23234200000000-0000-0000-0000-000000000000PT0Sfalseextension00000000-0000-0000-0000- 000000000000PT0SfalsettyStatusFalsefalse00000000-0000-0000-0000-000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse10d8b3b3-81d1-463c-8abe-a8b0ea52546f3b11dd5c-fcde-4f3b-8adb-4ca52b246ce50001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalsecountryDialingCode+100000000-0000-0000-0000-000000000000PT0SfalseareaCode23400000000-0000-0000-0000-000000000000PT0Sfalsenumber232342300000000-0000-0000-0000-000000000000PT0SfalsettyStatusFalsefalse00000000-0000-0000-0000- 000000000000PT0SfalseallowFirstPartyContactfalse00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse755efb54-6d98-4a58-8c4b-623b368f232471b34622-291c-43ff-a72a-42207091a1f90001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000Please Select from the Following OptionsPT0SfalsePlease Select from the Following选项falsefalsecac80052-56c0-4817-85b5-dca33417efc300000000-0000-0000-0000-0000000000160001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsedepartmentNameData Data Data00000000-0000-0000-0000-000000000000PT0SfalsejobTitleData Data Data00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalseaddressLine1Data Data Data00000000-0000-0000-0000-000000000000PT0SfalseaddressLine2Data Data Data00000000- 0000-0000-0000-000000000000PT0SfalseaddressLine3Data 数据Data00000000-0000-0000-0000-000000000000PT0SfalsecityPhoenix00000000-0000-0000-0000-000000000000PT0SfalseregionId99300000000-0000-0000-0000-000000000000PT0SfalsepostalCode6541200000000-0000-0000-0000-000000000000PT0SfalseallowFirstPartyContacttrue00000000-0000-0000-0000-000000000000PT0SfalseallowThirdPartyContactfalse00000000-0000-0000-0000-000000000000PT0SfalseregionArizona6663fcc6- 04ae-4a43-b9e9-790a0a9c762d4d2649af-698d-49b7-a025-2c28e1c955e90001-01-01T00:00:00PT0S00000000-0000-0000-0000-000000000000PT0SfalsedepartmentName00000000-0000-0000-0000-000000000000PT0SfalsejobTitle00000000-0000-0000-0000-000000000000PT0SfalsecountryCodeUS00000000-0000-0000-0000-000000000000PT0SfalseaddressLine100000000-0000-0000-0000-000000000000PT0SfalseaddressLine200000000-0000-0000-0000-000000000000PT0SfalseaddressLine300000000- 0000-0000-0000-000000000000PT0Sfalsecity00000000-0000-0000-0000-000000000000