I have a xml documents with following tags
<User>aaaa</User>
<User>bbbb</User>
<User>cccc</User>
<User>dddd</User>
<User>eeee</User>
<User>cccc</User>
<User>uuuu</User>
While iterating it using for loop the data is not coming in order
eg:
Some times getting
aaaa
bbbb
cccc
dddd
and some time it shows like this
uuuu
bbbb
cccc
dddd
How can i iterate in sequential manner ? Or provide name of any sequential xml parsers.
Thanks in advance
Here is an example where the results reflect the original ordering of the elements in the source XML document:
When this XQuery is performed on the following document (the provided XML fragment, wrapped into a single top element to make it a well-formed XML document):
the result is: