public class UnorderedDuplicateKeysException extends DeltaXMLProcessingException
An orderless element (one with the deltaxml:ordered='false'
attribute) cannot contain more than one child element
with the same name/type (ie. the same namespace URI and localName) and the same deltaxml:key
attribute value.
This exception is thrown whenever two such elements are found within the same orderless parent. There may be more than two child elements with the same key value, but only two are reported with an exception within any parent element and key value combination.
Note: the getErrorCode()
method is provided for compatibility with earlier XML Compare releases; when
called with this exception the result will be: 46
Constructor and Description |
---|
UnorderedDuplicateKeysException(java.lang.String parentElement,
java.lang.String keyValue,
java.lang.String child1,
java.lang.String child2)
Construct a new UnorderedDuplicateKeysException appropriate for use with the XML Compare code.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getChild1()
Reports the location (XPath) of the first shared-key child.
|
java.lang.String |
getChild2()
Reports the location (XPath) of the second shared-key child.
|
java.lang.String |
getIncorrectParentElement()
Reports the XPath of the orderless element.
|
java.lang.String |
getKeyValue()
Reports the shared key value.
|
getErrorCode, getSeverity
getCause, getThrowable
public UnorderedDuplicateKeysException(java.lang.String parentElement, java.lang.String keyValue, java.lang.String child1, java.lang.String child2)
parentElement
- String used to represent the XPath of the erroneous element.keyValue
- the value of the duplicated deltaxml:key attributechild1
- one of the children with duplicate keyschild2
- another child with duplicate keyspublic java.lang.String getIncorrectParentElement()
public java.lang.String getKeyValue()
public java.lang.String getChild1()
public java.lang.String getChild2()