public static void Main()
string anan1 = "<GatherFiles Name=\"Whitelisting Logs1\"> <File Name=\"Application event log\">App.evt</File> </GatherFiles>";
string anan2 = "<GatherFiles Name=\"Whitelisting Logs2\"> <File Name=\"Application event log\">App.evt</File> </GatherFiles>";
string anan3 = "<GatherFiles Name=\"Whitelisting Logs3\"> <File Name=\"Application event log\">App.evt</File> </GatherFiles>";
string anan4 = "<GatherFiles Name=\"Whitelisting Logs4\"> <File Name=\"Application event log\">App.evt</File> </GatherFiles>";
String [] templatess = {anan1, anan2, anan3, anan4};
foreach (String template in templatess)
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.LoadXml(template);
XmlElement root = xmlDoc.DocumentElement;
Console.WriteLine(root.GetAttribute("Name"));