public string[] Create(string settingsFile) { string FilePath = settingsFile; settingsFile = "my path/directory of the xml file"; string[] a = new string[20]; XmlTextReader xmlReader = new XmlTextReader(settingsFile); try { while (xmlReader.Read()) { switch (xmlReader.Name) { case "InputDataPath": a[0] = xmlReader.ReadString(); ErrorWatcher(a[0], "Status.error"); continue; case "BackupDataPath": a[1] = xmlReader.ReadString(); ErrorWatcher(a[1], "Status.error"); continue; case "ExportDatapath": a[2] = xmlReader.ReadString(); ErrorWatcher(a[2], "Status.error"); continue; } } } catch (Exception e) { return null; } return a; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)