Compare Items
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.
- Connect to the configuration web service.
- Specify the file format as either "DOCX" or "PDF".
- Get the appropriate version of the required items.
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);