In .NET, how do I read the text content from an XElement?
For example, from the XElement
XElement.Parse("<tag>Alice & Bob<other>cat</other></tag>")
I would like the string ‘Alice & Bob’
I tried element.Value but that returns ‘Alice & Bobcat’ 🙁
1 Answer