Reputation: 640
I want to compare two XML files, they are the same as each other. i have one of them in local storage and using bufferReader i put it on String and i get the other one from server and again put it into the String! then i Print the content of them and they are actually the same! nothing differs even spaces!! but when i compare them ( 2 strings) using equalsIgnoreCase they are not equal and always goes to else! which means they are not equal! can anybody help on this? if no way to compare like this so how can i compare them?
Upvotes: 1
Views: 854
Reputation: 40168
I think it happens due to formatting issue.
You can use XMLUnit to resolve the issue.
XMLUnit will help you in
Upvotes: 2