DifferentRootElementException ClassXML Compare .NET API Documentation
XML Compare .NET API Documentation - DEPRECATED
Files being compared must have equivalent root elements.
Inheritance Hierarchy

System Object
  System Exception
    Throwable
      Exception
        com.deltaxml.api DeltaXMLException
          com.deltaxml.api DeltaXMLProcessingException
            com.deltaxml.api DifferentRootElementException

Namespace: com.deltaxml.api
Assembly: deltaxml (in deltaxml.dll) Version: 10.4.0.1000
Syntax

[SerializableAttribute]
public class DifferentRootElementException : DeltaXMLProcessingException
Remarks

Files being compared must have equivalent root elements. This is because it is not possible to represent files with different root elements with a delta format.

The definition of equivalence/equality for root elements is: if one element is in a namespace then the other element must be in a namespace with the same URI; additionally the localNames of the elements must be identical. Note that this does not preclude, for example, using different namespace prefixes or different use of a default namespace.

Methods are provided to report both the QNames used (which could include different prefixes) or names in the {URI}localName notation.

Note: the getErrorCode() method is provided for compatibility with earlier XML Compare releases; when called with this exception the result will be: 4

See Also