I'm new to Jackson XML and I have a requirement of constructing a Jackson XML with different element name and attributes but under same root element.
My Expected xml output
<item name="Whatever">
<problem_id id="12312"/>
<problem_type type="1765"/>
<problem_desc desc="faulty"/>
</item>
My pojo class ( Not sure how to add the remaining elements and attributes)
@JacksonXmlRootElement(localName = "item")
public class ItemsDTO {
@JacksonXmlProperty(localName = "name",isAttribute = true)
private String name="Whatever";
}
Any advise would be much appreciated.