I use Jaxb2Marshaller
and XMLStreamWriter
to generate XML files from Java POJO-s from XSD
.
And I realized that the order of the attributes in the elements are different, if I run my application in different environments.
I also realized that in my machine it uses the same order as it is in the XSD, and in other machine it looks like it uses descending alphanumeric order.
But I cannot prove this desc. alphanumeric order of course, but it is very likely.
What could cause this order change?
I know that the order of the attributes should not matter in an XML, but really isn't there a solution to set an order for elements' attributes in Java? With any kind of library of course.