für das xml:hinzufügen Namespaced Attribut in modular
<foo xmlns="http://ns.com"
xmlns:ext="http://ext.com"
attr="xxx"
ext:bar="yyy">
</foo>
Wie kann ich eine Foo-Klasse erstellen? Genauer gesagt möchte ich das Attribut 'ext' irgendwie trennen können, so dass es nicht direkt in Foo, sondern in einer anderen Klasse und in einer typsicheren Weise (also nicht XmlAnyAttribute) ist.
Was ich wünsche optimal ist:
class Foo {
Ext ext;
}
class Ext {
String bar;
}
Was ist, wenn ich mehrere Attribute zuordnen möchte? – IttayD
Wie gebe ich an, dass Ext in einem anderen Namensraum gehört? – IttayD
@IttayD - Folgendes sollte helfen: http://blog.bdoughan.com/2010/08/jaxb-namespaces.html –