Skip to content

Instantly share code, notes, and snippets.

@virtualhobbit
Last active July 13, 2020 16:12
Embed
What would you like to do?
//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