This article was written by Vaiyapuri Subramanian. He writes "In SQL Server 2000, XML can be parsed using the extended stored procedure sp_xml_preparedocument. This works fine as long as a well-formed xml is provided. Then do whatever needs to be done and you can call the extended procedure sp_xml_removedocument to remove the document from memory. But what if the xml is not well-formed? How do you validate it?"