Cleaning Up SailPoint IIQ XML Exports — A Simple HTML Utility for Developers

When working with SailPoint IdentityIQ, many of us frequently pull objects from debug pages—Application objects, Rule definitions, Aggregation states, and more.

While these debug exports are extremely helpful, the XML almost always includes volatile fields like:

  • id

  • modified

  • created

  • lastAssigned

  • Various aggregation timestamps

These values change from environment to environment, cluttering version control diffs and making cross‑system comparisons harder than they need to be.

After doing this cleanup manually far too many times, I finally decided to use a tiny self‑contained HTML page that instantly strips out these unnecessary attributes.

And now I’m sharing it with you. :blush:

What This Tool Does

Simply paste your exported XML into the textarea, click “Perform CodeCleanUp”, and the script removes:

  • Auto‑generated IDs

  • Timestamps (created, modified, lastAssigned)

  • Aggregation start/end metadata

  • Special handling for Rule <Source> blocks so logic isn’t touched

It’s a lightweight JavaScript utility—no external libraries required.

The Code

Here’s the full HTML (just save it as iiq-cleanup.html and open it in your browser):

<html>
<head>
<script language="javascript">

function doReplacements(str) {
str = str.replace( /\s+id=["'][^"']*["']/g, "");
str = str.replace( /\s+modified=["'][^"']*["']/g, "");
str = str.replace( /\s+created=["'][^"']*["']/g, "");
str = str.replace( /\s+lastAssigned=["'][^"']*["']/g, "");
return str;
}

function doIt_onClick(form) {
var tBox = form.xmlArea;
var str = tBox.value;
var isAppDef = str.indexOf( "DOCTYPE Application" ) > 0 ? true : false;
var isRuleDef = str.indexOf( "DOCTYPE Rule" ) > 0 ? true : false;
if(isRuleDef){
var tokens = str.split( /<Source>/);
var str = tokens[0];
str = doReplacements(str);
tBox.value = str + "<Source>" +tokens[1];
}else{
   str = doReplacements(str);
str=str.replace(/<entry\s+key="acctAggregationEnd">[^<]+<value>[^<]+<Date>\d+<\/Date>[^<]+<\/value>[^<]+<\/entry>[^<]+<entry\s+key="acctAggregationStart">[^<]+<value>[^<]+<Date>\d+<\/Date>[^<]+<\/value>[^<]+<\/entry>[^<]+<entry\s+/, "<entry ");
tBox.value = str;
}
   alert("XML code is cleansed now");
}
</script>

<style>
h2{font-family: tahoma, verdana,helvetica}
</style>
</head>
<body>
<h2>IIQ Code CleanUp</h2>
<form name="frmDoIt" onSubmit="return false;">
<textarea rows=30 cols=120 name="xmlArea">
</textarea><br/>
<button name="btnDoIt" onClick="doIt_onClick(this.form)">Perform CodeCleanUp</button>
</form>
</body>
</html>

Why This Helps

This tool is especially useful for:

  • Cleaning XML before committing to Git or importing to local env.

  • Comparing objects across dev/test/prod

  • Sharing examples with teammates without leaking internal IDs

  • Preparing cleaner snippets for documentation or SailPoint community posts

Many developers struggle with “noisy” debug exports—this solves the problem in one click.

2 Likes