/// <summary> /// Run the file transformation and output the remapped file /// </summary> /// <returns>TRUE if we found at least one reference to replace. FALSE no replacements were found</returns> public bool Execute() { //4. Load XML for *.twb file var xmlDoc = new XmlDocument(); xmlDoc.Load(_pathToTwbInput); bool foundReplaceItem = RemapDatasourceCsvReference(xmlDoc, _oldDatasourceFilename, _datasourceNewCsvPath, _statusLog); //Write out the transformed XML document TableauPersistFileHelper.WriteTableauXmlFile(xmlDoc, _pathToTwbOutput); return(foundReplaceItem); }
/// <summary> /// Run the file transformation and output the remapped file /// </summary> public void Execute() { //Load XML for *.twb file var xmlDoc = new XmlDocument(); xmlDoc.Load(_pathToTwbInput); //Look for Data Sources that are 'sqlproxy' //Remap server-path to point to correct server/site RemapDataServerReferences(xmlDoc, _serverMapInfo, _statusLog); //Remap global XML references to the server RemapWorkbookGlobalReferences(xmlDoc, _serverMapInfo, _statusLog); //Write out the transformed XML document TableauPersistFileHelper.WriteTableauXmlFile(xmlDoc, _pathToTwbOutput); }