protected static void ValidXmlFile(string xml) { if (!File.Exists(xml)) throw new FileNotFoundException(); XmlDocument xDoc = new XmlDocument(); xDoc.XmlResolver = FileStreamXmlResolver.GetNullResolver(); xDoc.Load(xml); } }