I have a question regarding SQL Server. I have a table with an ntext datatype column where I am storing XML data. My question is: How do I write a user-defined function to retrieve a particular xml attribute in that column?