public static XmlDocument LoadXMLDocument(string file) { // Check if File Exist if (!File.Exists(file)) return null; XmlDocument doc = new XmlDocument(); try { doc.Load(file); } catch (XmlException e) { return null; } return doc; }