tags:

views:

561

answers:

2

I'm in the process of converting a varchar(8000) field to an xml field in MSSQL 2005. Many of the XML docs have small issues (example: degree symbol not encoded). Is there a better way to validate the XML than a Try/Catch process?

Maybe I could write a .NET Stored Procedure. What is the proper method to validate (or invalidate) an XML document in .NET?

+1  A: 

You could write a Stored Procedure in managed code. Here are some samples http://www.yukonxml.com/articles/sqlclr/

Bruno Shine
A: 

So far I think it is more simple (but brute) to use the Try/Catch method. The team I am working on hasn't really started using Managed Stored Procs yet.

tyndall