Re: [xml] Ordering of TAGS and data



Paul Robert Hayes writes:
There has been discussion here of ordering of tags and data within an XML
file.  From what I have seen, the TAGS (beginning and ending <> sections)
appear to be ordered when read through Internet Explorer and Konqueror as
well as libxml.  Several people have noted that there is no guarantee of the
ordering, though.  To me this does not make sense from a parsing standpoint
because the data within a <> section was created by the user and shouldn’t
be reordered by the viewer.  Does this stir anyone’s memory of XML ordering?

Of course it is ordered.

Wouldn't be helpfull, if an document consisting of a number of p (HTML) or
para (docbook) elements, could be randomly reodered ;-)

OTOH it depends on the definition of an xml application, to what extend
order is meaningfull and defined.
Eg. the xml serialisiation of a set of number tuples might look like
<set>
<tuple><first>1</first><second>1</second></tuple>
<tuple><second>3</second><first>3</first></tuple>
<tuple><first>2</first><second>2</second></tuple>
</set>
where neither the order of the first, second subelement is defined by
the application (that is, you must be able to process any order) nor
the order of the tuples has any meaning.

But for a given xml instance the order is always the same as in the textual
representation.

I don't think that this is related to libxml though.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]