What does the SQL Server XML datatype translate to in .NET and how do I convert it to XmlDocument?

.net, c#, sql-server-2005

Solution

I remember casting it to a string. Feeding XmlDocument with a string works as usual then.

Problem

We have a column in the database that has a type of `xml`. I am reading this information via the .net `SqlDataReader`, but I'm not sure what to cast it to. The msdn table (http://msdn.microsoft.com/en-us/library/cc716729.aspx) suggests that is of the .net type `Xml`, but there is no `System.Xml`, only `System.Web.UI.WebControls.Xml` so I'm not sure if that is correct. So my question is this: What do I cast the `SqlDbType.Xml` to as I'm reading it from a `SqlDataReader`, and how do I convert that to `XmlDocument`?

Original source