tags:

views:

76

answers:

2

can you easily convert an xdocument and xelement into string to store in the db?

+5  A: 

Have you tried using ToString() or ToString(SaveOptions)?

There are various alternatives depending on what you want to do, but those are the simplest :)

Jon Skeet
+1 It's so simple it might just work!
Chris Ballance
+1  A: 

In you want the content of the element you could use .InnerText or if you want the XML of the element you could use .InnerXml

Stéphane