java - jUnit comparing XML strings fails even though the XMLs are the same -
i writing series of junit tests ensure proxy servlet fetches xmls client page variety of sources.
one of tests send request servlet fetch xml , compares local copy same (i think)
i examined length of each xml quite interesting.
local copy length = 1753
remote version length = 1796
i using asserttrue()
asserttrue(remote.equals(local));
any ideas why there difference in length, there way in junit can compare xmls ensure expected , syntactically correct?
any other suggestions welcome?
on question of better ways compare xml's - have used xmlunit , feel works out well.