public void Execute(Dictionary<string, string> parameters, Processor processor) { var storageDomain = processor.GetStorageDomain(parameters["storageDomain"]); processor.AddDomain(parameters["domain"]); var domain = processor.GetDomain(parameters["domain"]); var xmlDocument = XDocument.Load(parameters["xmlFile"]); foreach (var xmlDefines in storageDomain) { var path = xmlDefines.Value.Split(':'); var element = xmlDocument.XPathSelectElement(path[0]); if (element == null) continue; domain.Add(xmlDefines.Key, path.Length == 2 ? element.Attribute(path[1]).Value : element.Value); } }