Is there a way to validate XML using T-SQL?
I am in the process of converting a varchar (8000) field to an xml field in MSSQL 2005. Many XML documents have minor issues (ex: the degree character is not encoded). Is there a better way to validate XML than the Try / Catch process?
Maybe I can write a .NET Stored Procedure. What is the proper method for validating (or invalidating) an XML document in .NET?
0
BuddyJoe
source
to share
2 answers
You can write a stored procedure in managed code. Here are some examples http://www.yukonxml.com/articles/sqlclr/
+1
Bruno shine
source
to share
So far, I find it easier (but crude) to use the Try / Catch method. The team I'm working on hasn't started using Managed Stored Procs yet.
0
BuddyJoe
source
to share