DocumentComparator ClassXML Compare .NET API Documentation
XML Compare .NET API Documentation - DEPRECATED
Provides a pre-configured comparison tool more suited for document comparison.
Inheritance Hierarchy

System Object
  DeltaXML.CoreS9Api.Internals CommonComparator
    DeltaXML.CoreS9Api DocumentComparator

Namespace: DeltaXML.CoreS9Api
Assembly: DeltaXML.CoreS9Api (in DeltaXML.CoreS9Api.dll) Version: 10.4.0.1000 (10.4.0.1000)
Syntax

[ObsoleteAttribute("XML Compare's .NET API is considered deprecated as of version 10.0.0. Please consider using either our Java or REST APIs, and contact DeltaXML for help: https://www.deltaxml.com/contact")]
public class DocumentComparator : CommonComparator
Remarks

Provides a pre-configured comparison tool more suited for document comparison.

The DocumentComparator includes pre- and post-comparison filters for improving results for many items commonly featured in XML documents. These items include:

  • CALS tables
  • XHTML tables
  • nline formatting markup
  • Doctypes and entities
  • Comments and processing instructions

'FORMAT-AWARE' COMPARISON

One of the main features of the DocumentComparator is that it can be configured to remove formatting elements for the purposes of word alignment during comparison. This leads to significant improvements in the comparison results of text content when the formatting of text changes.

Due to structural changes that occur in the XML when inline formatting elements are added, removed or changed, it can be all too easy to find deletion and addition of identical text in a comparison result. The DocumentComparator takes the approach that 'content is king' and that if textual content hasn't been changed then there should be no text changes highlighted in the result.

In order to achieve this result, inline formatting elements must be highlighted in the input files before comparison. Formating elements must be marked with a deltaxml:format="true" attribute. The simplest way of achieving this is to write an XSLT filter that adds the attributes to the relevant elements, then add it to the PRE_FLATTENING extension point before comparison using the setExtensionPoint(DocumentComparator ExtensionPoint, FilterChain) method.

See Also