Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Last active July 13, 2020 16:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save virtualhobbit/fc4e75be0c7df35729cc1ebb2b191678 to your computer and use it in GitHub Desktop.
Save virtualhobbit/fc4e75be0c7df35729cc1ebb2b191678 to your computer and use it in GitHub Desktop.
//Define XML properties
var xmlDetail = new Properties();
xmlDetail.put("{attXmlConfigAction}",inAction);
xmlDetail.put("{attXmlConfigRecord}",inRecord);
xmlDetail.put("{attXmlConfigType}",inType);
xmlDetail.put("{attXmlConfigTtl}",inTtl);
xmlDetail.put("{attXmlConfigValue}",inValue);
//Replace placeholders in XML file with correct values
var attBody = attXmlConfigBody.getContentAsMimeAttachment().content;
for each (var key in xmlDetail.keys) {
attBody = attBody.replace(key, xmlDetail.get(key));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment