I'm using SQL Server 2005 and 2008 and am trying to import a variety different XML files into my db, and occasionally the XML is not valid. Each XML file will differ from the last.Is there any way to create a function which will return 0 or 1 depending on whether the XML is valid?ThanksC