public static boolean isIdentical ( final String expected , final String actual ) { final Diff diff = createDiffResult ( expected , actual , false ) ; return diff . identical ( ) ; }
This method will compare both XMLs and validate its attribute order .