Package org.simpleframework.xml
Annotation Interface Order
The
Order
annotation is used to specify the order of
appearance of XML elements and attributes. When used it ensures
that on serialization the XML generated is predictable. By default
serialization of fields is done in declaration order.-
Element Details
-
elements
String[] elementsSpecifies the appearance order of the XML elements within the generated document. This overrides the default order used, which is the declaration order within the class. If an element is not specified within this array then its order will be the appearance order directly after the last specified element.- Returns:
- an ordered array of elements representing order
- Default:
{}
-
attributes
String[] attributesSpecifies the appearance order of the XML attributes within the generated document. This overrides the default order used, which is the declaration order within the class. If an attribute is not specified within this array then its order will be the appearance order directly after the last specified attribute.- Returns:
- an ordered array of attributes representing order
- Default:
{}
-