importance of elements order in XML
So, I think I was convinced regarding preserving the elements order in XML data in the previous discussion here. Preserving the order is important. Two XML trees are not equal if the order of subelements is different. That's how we should define equals() for XML trees.
Then I bumped into a counterexample.
Consider two RSS feeds:
and
Do you think these two RSS feeds are different? I do not think so. They contain exactly the same information.
So, any ideas regarding elements order, equals() and everything?
Then I bumped into a counterexample.
Consider two RSS feeds:
<rss version="0.94"> <channel> <title>Example Channel</title> <link>http://example.com/</link> <description>an example feed</description> <language>en</language> <skipHours> <hour>24</hour> </skipHours> <item> <title>1 < 2</title> <link>http://example.com/1_less_than_2.html</link> <description type="text/plain">1 < 2, 3 < 4. In HTML, <b> starts a bold phrase and you start a link with <a href= </description> </item> </channel> </rss>
and
<rss version="0.94"> <channel> <title>Example Channel</title> <description>an example feed</description> <skipHours> <hour>24</hour> </skipHours> <language>en</language> <link>http://example.com/</link> <item> <title>1 < 2</title> <description type="text/plain">1 < 2, 3 < 4. In HTML, <b> starts a bold phrase and you start a link with <a href= </description> <link>http://example.com/1_less_than_2.html</link> </item> </channel> </rss>
Do you think these two RSS feeds are different? I do not think so. They contain exactly the same information.
So, any ideas regarding elements order, equals() and everything?
