データ モデルの xml 表現を生成したいのですが、モデルを変更して JAXB のようなものや注釈を記述したくありません。透明感のある柔軟なデザインが欲しい。
何か案は?
ありがとう!
編集 - 広告の例
public class Figure {
private String name;
private String color;
public Figure(String name, String color) {
super();
this.name = name;
this.color = color;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
そしてそれはxmlです:
<Figure>
<name>square</name>
<color>red</color>
</Figure>
これは些細な例です。私の本当の質問は、「パーサー/コーダー/デコーダー」を変更せずに、オブジェクトの構成またはモデルの変更をサポートするにはどうすればよいですか?