Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save virtualhobbit/46f06e6c5e72122228c12fbf7af90710 to your computer and use it in GitHub Desktop.
Save virtualhobbit/46f06e6c5e72122228c12fbf7af90710 to your computer and use it in GitHub Desktop.
var xmlDetail = new Properties();
xmlDetail.put("{attXmlConfigName}",attXmlConfigName);
xmlDetail.put("{attXmlConfigResourcePoolId}",attXmlConfigResourcePoolId);
xmlDetail.put("{attXmlConfigDatastoreId}",attXmlConfigDatastoreId);
xmlDetail.put("{attXmlConfigNicName}",attXmlConfigNicName);
xmlDetail.put("{attXmlConfigPortgroupId}",attXmlConfigPortgroupId);
xmlDetail.put("{attXmlConfigPrimaryAddress}",attXmlConfigPrimaryAddress);
xmlDetail.put("{attXmlConfigSubnetMask}",attXmlConfigSubnetMask);
xmlDetail.put("{attXmlConfigUserName}",attXmlConfigUserName);
xmlDetail.put("{attXmlConfigPassword}",attXmlConfigPassword);
//Replace placeholders in XML file with correct values
var attBody = attXmlConfigEsgBody.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