This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Export, Print, and Save XML Comparison Results

Save Printable HTML Report

To save a printable version of an XML comparison report,

  1. On the Comparison tab, in the Comparison section, select Save As > HTML or Word.

    The Save dialog box opens, where you can choose to save a printable version of the XML comparison report.

  2. Select a file name and location to save the report.

The report is a noninteractive HTML document of the differences detected by the algorithm for printing, sharing, or archiving a record of the comparison. If you have applied filters, your filtered results appear in the printable report.

Export Results to the Workspace

To export the XML comparison results to the MATLAB® base workspace,

  1. On the Comparison tab, in the Comparison section, select Save As > Workspace variable.

    The Input Variable Name dialog box appears.

  2. Specify a name for the export object in the dialog and click OK. This action exports the results of the XML comparison to an xmlcomp.Edits object in the workspace.

The xmlcomp.Edits object contains information about the XML comparison including file names, filters applied, and hierarchical nodes that differ between the two XML files.

To create an xmlcomp.Edits object at the command line without opening the Comparison Tool, enter:

Edits =,modelname_B) 

Property of xmlcomp.EditsDescription
FiltersArray of filter structure arrays. Each structure has two fields, Name and Value.
LeftFileNameFile name of left model exported to XML.
LeftRootxmlcomp.Node object that references the root of the left tree.
RightFileNameFile name of right model exported to XML.
RightRootxmlcomp.Node object that references the root of the right tree.
TimeSavedTime when results exported to the workspace.
VersionMathWorks® release-specific version number of xmlcomp.Edits object.

Property of xmlcomp.NodeDescription
ChildrenArray of xmlcomp.Node references to child nodes, if any.
EditedBoolean — If Edited = true then the node is either inserted (green) or part of a modified matched pair (pink).
NameName of node.
ParametersArray of parameter structure arrays. Each structure has two fields, Name and Value.
Parentxmlcomp.Node reference to parent node, if any.
PartnerIf matched, Partner is an xmlcomp.Node reference to the matched partner node in the other tree. Otherwise empty [].

Save Comparison Log Files in a Zip File

Temporary comparison files accumulate in tempdir/MatlabComparisons/XMLComparisons/TempDirs/. These temporary files are deleted when you close the related comparison report.

You can zip the temporary files (such as log files) created during XML text comparisons for sharing or archiving. While the comparison report is open, enter:


The destination folder must exist. The output reports the zip file name:

Created the zipfile "c:\work\myexportfolder\"

To view the log file for the last comparison in the MATLAB Editor, enter:


Was this topic helpful?