converting xdoc or xelement into string? [closed]
can you easily convert an xdocument and xelement into string to store in the db?
Have you tried using ToString()
or ToString(SaveOptions)
?
There are various alternatives depending on what you want to do, but those are the simplest :)
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
精彩评论