private ComparisonState compareElements ( final Element control , final XPathContext controlContext , final Element test , final XPathContext testContext ) { return compare ( new Comparison ( ComparisonType . ELEMENT_TAG_NAME , control , getXPath ( controlContext ) , Nodes . getQName ( control ) . getLocalPart ( ) , getParentXPath ( controlContext ) , test , getXPath ( testContext ) , Nodes . getQName ( test ) . getLocalPart ( ) , getParentXPath ( testContext ) ) ) . andThen ( new DeferredComparison ( ) { @ Override public ComparisonState apply ( ) { return compareElementAttributes ( control , controlContext , test , testContext ) ; } } ) ; }
Compares elements node properties in particular the element s name and its attributes .