public bool PrepareXML(string timeInUse = null) { List <string> dataPointsInUse; if (timeInUse != null) { dataPointsInUse = new List <string> { timeInUse }; dataPointsInUse = GetDataPointsInUse(dataPointsInUse, "xmlElement", "xmlXPath"); } else { dataPointsInUse = GetDataPointsInUse("xmlElement", "xmlXPath"); } if (dataPointsInUse.Count == 0) { return(true); } XmlProcessor xmlProcessor = new XmlProcessor(); try { dataRecords = xmlProcessor.GetRecords(dataFile, dataRestURL, repeatingElement, dataSourceFileOrURL, dataPointsInUse, xmlToString, node); } catch (Exception ex) { sourceLogger.Error(ex, "Error retrieving XML data "); return(false); } return(true); }