I have an XElement and inside that element I have another XML fragment. How do I retrieve the XML?
If I try the following, I get only the value:
string str = '<Root><Node1>value1</Node1><Node2></Node2></Root>'; XElement elem = XElement.Parse(str); string innerXml = elem.value;
Eric White just posted a blog article to do exactly that – convert XElement to XmlNode and back.
Check it out here.
Marc