Venugopal L
Venugopal L

Reputation: 1

JAXB Output XML Attributes to be desired order

I am using JAXB classes for writing xml. While marshalling the order of attributes to be displayed in our desired order. Please suggest to solve this one.

My Current Output: <ELD UID="1000" Designation="SUPERSTRUCTURE" Code="11">

Required Output: <ELD UID="1000" Code="11" Designation="SUPERSTRUCTURE">

Upvotes: 0

Views: 85

Answers (1)

Arunas Junevicius
Arunas Junevicius

Reputation: 747

It depends on what JAXB implementation you use, if you're willing to use MOXy then it's possible to implement DescriptionCustomizer.

Upvotes: 1

Related Questions