I have an XML file that I'm trying to parse with Linq-to-XML. One of the nodes contains a bit of HTML, that I cannot retrieve.
The XML resembles:
<?xml version="1.0" encoding="ISO-8859-1"?>
<root>
<image><img src="/Images/m1cznk4a6fh7.jpg" /></image>
<contentType>Banner</contentType>
</root>
The code is:
XDocument document = XDocument.Parse(content.XML);
XElement imageElement = document.Descendants("image").SingleOrDefault();
image = imageElement.Value; // Doesn't get the content, while if I specify .Descendants("contentType") it works
Any ideas?