public static void Main()
string xml = @"<?xml version=""1.0"" encoding=""utf-8""?>
<text>How to get <bold>all</bold> this string's content?</text>
XDocument doc = XDocument.Parse(xml);
var textClasses = from n in doc.Descendants("text").DescendantNodes()
where n.NodeType == XmlNodeType.Text
select new { text = ((XText)n).Value, bold = n.Parent?.Name == "bold" };
foreach (var tc in textClasses)
Console.WriteLine("text: " + tc.text + ", " + "bold: " + tc.bold);