views:

362

answers:

1

I have xml files I want to read in and store in the database. Linq to sql requires the data to be sent in using an xelement, but if I send in the data this

new XElement("build", BuildNode.InnerXml)

I end up with data looking like this in the database lt;..gt;.. It converts the brackets into lt; and gt; which then makes the data useless from a xml standpoint.

Any ideas on how to get the xml data inside the xml column?

+1  A: 

Looks like you should use XElement.Parse(BuildNode.InnerXml) instead of just passing the raw property in.

RE: http://social.msdn.microsoft.com/Forums/en-US/csharplanguage/thread/413654f3-dc2d-4b96-8a7e-bde69da05866/

Paul Prewett