Does xmls nodes sequence matter?
are
<parent>
<first_child>1111111</first_child>
<second_child>2222222</second_child>
</parent>
and
<parent>
<second_child>2222222</second_child>
<开发者_运维知识库;first_child>1111111</first_child>
</parent>
should be considered as xmls with the same structure or not?
It entirely depends on what's going to interpret the XML.
Imagine it's actually HTML, and these are paragraph tags... obviously the order matters. In other cases, it may not.
It basically depends on how you define your schema, e.g. with XSD you can use all
if order does not matter or sequence
if it does. See the w3schools page for details.
It depends on the schema that is used to validate it.
精彩评论