XJC generates class like this:
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"el"
})
@XmlRootElement(name = "root")
public class Root {
@XmlElement(required = true)
protected String el;
@XmlAttribute(name = "atr")
protected String atr;
//...
}
I need "atr" to be first element of "Root".
More specific question is how can I force XJC to put fields marked with @XmlAttribute before fields marked with @XmlElement.
What I've tried: 1. Find XJC annotation to control the order of the element. I didn't find any. 2. Use XJC's plugin to manually change the order. However, implClass.fields() returns UnmodifiableMap