protected void compareDocument ( Document control , Document test , DifferenceListener listener , ElementQualifier elementQualifier ) throws DifferenceFoundException { DocumentType controlDoctype = control . getDoctype ( ) ; DocumentType testDoctype = test . getDoctype ( ) ; compare ( getNullOrNotNull ( controlDoctype ) , getNullOrNotNull ( testDoctype ) , controlDoctype , testDoctype , listener , HAS_DOCTYPE_DECLARATION ) ; if ( controlDoctype != null && testDoctype != null ) { compareNode ( controlDoctype , testDoctype , listener , elementQualifier ) ; } }
Compare two Documents for doctype and then element differences