2
J'ai la construction suivante:héritage JAXB + élément renomment
@XMLTransient
public abstract class Foo {
protected String name;
}
@XmlRootElement
@XmlType(propOrder={"name"})
public class BarX extends Foo {
public String getXThing() {
return name;
}
public void setXThing(String thing) {
name = thing;
}
}
@XmlRootElement
@XmlType(propOrder={"name"})
public class BarY extends Foo {
public String getYBlah() {
return name;
}
public void setYBlah(String blah) {
name = blah;
}
}
Dans le XML j'ai besoin pour BarX au lieu de name
l'étiquette thing
et Bary Je voudrais avoir blah
au lieu de name
. Est-ce possible et comment je peux l'obtenir?
Aaah, ok. Merci beaucoup. – arothe