I have a class:
public class SomeClass {
public String a = "tag"
@JacksonXmlProperty(isAttribute = true)
public String b = "attribute"
}
I need to set variable b
as a property of variable a
:
<SomeClass>
<a b="attribute">tag</a>
</SomeClass>
I tried @JacksonXmlProperty(isAttribute = true)
, but it maps my attribute only to the root tag:
<SomeClass b="attribute">
<a>tag</a>
</SomeClass>
It there a way to handle this problem with annotations?