I seem to always have problems with converting data to and from XML in C#. It always wants you to create a full XMLDocument object even when you think you shouldn't have to. In this case I have a SQLXML column in a MS SQL 2005 server that I am trying to pull out and push into a function that requires an XMLNode as a parameter. You would think this would be easy, but outside of converting it to a string and creating a new XMLNode object I cannot figure out the right way to do it.
I can use an SqlDataReader, the sqlComm.ExecuteReader() to load the reader, and sqlReader.GetSqlXml(0) to get the SQLXML object,but then how do I convert it to an XmlNode?
Conversely I can use the sqlComm.ExecuteXmlReader() to get an XmlReader, but how do I extract a XmlNode from the reader? http://bytes.com/forum/thread177004.html says it cannot be done with a XmlTextReader, should I use a XmlNodeReader?
Help please!