How to read xml comment when using XDocument?
XDocument doc = XDocument.Load(\"joker.xml\");
foreach (XElement element in doc.Descendants(\"server\"))
Check node type when reading xml. If it's XComment then you are reading comment. E.g. in your case previous node of server element will be comment:
foreach(var s in doc.Descendants("server"))
{
var comment = s.PreviousNode as XComment;
if (comment != null)
Console.WriteLine(comment.Value); // outputs "Dummy servers"
}