KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
My XML is: <CurrentWeather> <Location>Berlin</Location> </CurrentWeather> I want the string "Berlin", how do get contents out of the element Location , something like InnerText ? XDocument xdoc = XDocument.Parse(xml); string location = xdoc.Descendants("Location").ToString(); the above returns System.Xml.Linq.XContainer+d__a
Tags (comma-separated)
Save Edits
Cancel