Akash Kava
Akash Kava

Reputation: 39916

how to get text representation from XDocument?

XmlDocument class has a property "Text" whicn allows you to get text representation of XML (that is only the text part collected within all the nodes), how do I get it from XDocument?

Upvotes: 1

Views: 629

Answers (1)

Jon Skeet
Jon Skeet

Reputation: 1500855

Have you tried:

string text = doc.Root.Value;

?

Upvotes: 4

Related Questions