Skip to main content

JAXB orders xml elements alfabetically

1 reply [Last post]
applebanana8
Offline
Joined: 2004-06-16

When I write the following JAXB schema:

--------------------------------------------------

--------------------------------------------------

And parses this xml file
--------------------------------------------------

bbb
aaa
ccc

--------------------------------------------------

The generated java code always returns a List of the Child elements in alfabetically order. Thus {"aaa", "bbb", "ccc"} no mather in which order there original xml order. Is there a way to preserve the exact same order in the java code as is declared in the XML file?

thanks, Cees van Wieringen.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
applebanana8
Offline
Joined: 2004-06-16

Sorry My mistake JAXB handles everything correct it's a bug somewhere in our own code.
Sorry for any inconveniece.

Cees van Wieringen