This allows the comparison of any two items of the same type, or two versions of the same item, and displays the differences in a document.


Code Sample


# Get the source and destination items.

$source = $xia.GET_Item(1234, 0);

$destination = $xia.GET_Item(1234, 0);


# Perform the comparison.

Write-Host "Performing comparison...";

$documentPackage = $xia.Get_ItemComparison($source, $destination, $fileformat);


# Save and open the file.

$filename = "$($env:TEMP)\$($documentPackage.Filename)";

[IO.File]::WriteAllBytes($filename, $documentPackage.FileData);

[System.Diagnostics.Process]::Start($filename);