• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

How to compare to XML String?

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I need to compare two XMLString in java(Based on values)
any stright forward logic.


Thanks in Advance,
Akilan
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I think that can be rather hard when you consider that you can write an empty element <val/> or <val></val> and also that you probably want to ignore whitespace that is just pretty formatting.
Are these strings complete XML documents of just fragments? Do you have to compare the whole document or just known elements?
Bill
 
Akilan IrudayaRaaja
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to compare two XMLString only based on values.
It should not compare with size, and It should not consider
'\n' , only values should be compared.
if anything not equal, I need to show error that, particular element is
not equal.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!