我们在数据库中列有型 XML
的。我读通过.NET SqlDataReader的
此信息,但我不知道该怎么投它。
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.
在MSDN表(http://msdn.microsoft.com/en-us/library/cc716729.aspx)表明是.NET类型 XML
的,但没有的System.Xml
,只有 System.Web.UI.WebControls.Xml
所以我不知道这是正确的。
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:
什么我投了 SqlDbType.Xml
为我从阅读它 SqlDataReader的
,以及如何我将其转换为的XmlDocument
?
What do I cast the SqlDbType.Xml
to as I'm reading it from a SqlDataReader
, and how do I convert that to XmlDocument
?
推荐答案
我记得铸造为字符串。饲养XmlDocument的一个字符串照常工作呢。
I remember casting it to a string. Feeding XmlDocument with a string works as usual then.
相关推荐
最新文章