The XML Diff Viewer

This section describes the XML Diff Viewer and its features, including the different views available for comparing documents, the XML Diff Viewer tool bar, and tools for loading documents.

This section covers the following topics:

Split View - Tree

You use the XML Diff Viewer to compare two or more XML documents. By default, the XML Diff Viewer displays the diffed documents on the Split View - Tree tab. This view, shown in Figure 132, shows the documents side-by-side using a tree/node representation.

In split views (there is also a split view that shows documents in XML), source documents are displayed on the left, the target document on the right. A splitter between the two panes allows you to change the width of the source and target document panes by dragging the splitter to the left and right.

Split View - Text

The Split View - Text tab also shows source and target documents side-by-side in plain XML.

Merged View

If you prefer, you can select the Merged View tab, which folds the nodes from the source and target documents into a single window, as shown in Figure 134

.

The merged view displays changed items in pairs - the item from the target document appears first, the item from the source document is shown second, as shown in Figure 135.

In this example, the line through the <au_lname> element in the source document, Hennings, indicates that it has changed to White in the target document.

View Symbols and Colors

All views use the same symbols and color schemes to identify the types of changes detected by the Stylus Studio diff calculation - by default, green for added items, yellow for changed items, and red for removed items. In addition, the text font and size are controlled by the settings for the XML Editor on the Editor Format page of the Options dialog box.

See Symbols and Background Colors for more information on this topic, and to learn how you can assign custom colors to the results of standard differencing operations.

The XML Diff Viewer Tool Bar

The XML Diff Viewer tool bar, shown in Figure 136, provides tools to help you

The following table identifies the individual tools and tells you where to find more information.

Tool Button
Description
Skips to the next (previous) diff in the currently selected document. You must select a line in the document to enable these buttons.
Note that changing this setting requires documents to be diffed again.
Note that changing this setting requires documents to be diffed again.
Note that this feature affects only the display, and not the calculation, of comment differences.
Note that this feature affects only the display, and not the calculation, of text block differences.
Note that this feature affects only the display, and not the calculation, of attribute differences.
Note that this feature affects only the display, and not the calculation, of processing instruction differences.
Note that this feature affects only the display, and not the calculation, of entity differences.
Note that this feature affects only the display, and not the calculation, of entity differences.
Allows you to change the font of documents displayed in the XML Diff Viewer.
Table 17. XML Diff Tool Bar Buttons

Tools for Working with Documents

The XML Diff Viewer provides several tools for working with source and target documents:

You use the remove button, the folder with the red minus sign on it ( ), to remove the current source document from the XML diff calculation.

Removing a Target Document

You cannot remove a target document. You can specify a different target document by clicking the set target button ( ) again. This replaces the current target document with the document you select.

 
Free Stylus Studio XML Training: