/** * Compare 2 elements and their attributes * @param control * @param test * @param listener * @throws DifferenceFoundException */ protected void compareElement(Element control, Element test, DifferenceListener listener) throws DifferenceFoundException { compare(getUnNamespacedNodeName(control), getUnNamespacedNodeName(test), control, test, listener, ELEMENT_TAG_NAME); NamedNodeMap controlAttr = control.getAttributes(); Integer controlNonXmlnsAttrLength = getNonSpecialAttrLength(controlAttr); NamedNodeMap testAttr = test.getAttributes(); Integer testNonXmlnsAttrLength = getNonSpecialAttrLength(testAttr); compare(controlNonXmlnsAttrLength, testNonXmlnsAttrLength, control, test, listener, ELEMENT_NUM_ATTRIBUTES); compareElementAttributes(control, test, controlAttr, testAttr, listener); }
/** * Compare 2 elements and their attributes * @param control * @param test * @param listener * @throws DifferenceFoundException */ protected void compareElement(Element control, Element test, DifferenceListener listener) throws DifferenceFoundException { compare(getUnNamespacedNodeName(control), getUnNamespacedNodeName(test), control, test, listener, ELEMENT_TAG_NAME); NamedNodeMap controlAttr = control.getAttributes(); Integer controlNonXmlnsAttrLength = getNonSpecialAttrLength(controlAttr); NamedNodeMap testAttr = test.getAttributes(); Integer testNonXmlnsAttrLength = getNonSpecialAttrLength(testAttr); compare(controlNonXmlnsAttrLength, testNonXmlnsAttrLength, control, test, listener, ELEMENT_NUM_ATTRIBUTES); compareElementAttributes(control, test, controlAttr, testAttr, listener); }