I want to create xml from my object, but instead of XML nodes I would like to create an ie attribute
@XmlRootElement
class MyObject{
private String name;
private String age;
...getters/setters...
}
And I want my object to create this xml:
<MyObject name="something">
<age></age>
</MyObject>
How can i do this?
source
share