Moon123 wrote:Those are not good reasons to use SAX in this case. Its also far more cumbersome, unfriendly to changes in the XML and a heck of a lot more work. But you have more points...
Thank you both.
I am going to do the following steps. Do they seem correct or the best way to you guys?
1) Parse in 2 XML files using SAX (faster and uses less memory)
2) Store elements/value pair in Hashmaps(that would eat up a large amount of memory again, defeating one of your reasons for using SAX)
3) Compare the two Hashmaps to see if they both have the same value for the same keys (elements)That COULD work, if you had some wicked cleanup routines. Remember: a single space can already make two strings unequal. The ordering of elements and attributes is another thing that will make your life very difficult.
4) print out the differences if they are not the same