public static void Main()
string StringXML = @"<?xml version='1.0'?>
<from add='abc1'>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
<heading>Reminder</heading>
<body>Don't forget me this <rref add='10'>10</rref> weekend!</body>
XDocument Doc = XDocument.Parse(StringXML);
var nodess = from note in Doc.Descendants()
where note.Attribute("add") !=null && !note.IsEmpty
select note.Attribute("add").Value;
foreach(var node in nodess)