[SOLVED] How to get nested elements with JacksonXmlRootElement?


I am using Java/Spring

I have XML like this:


and I just need to access to XML element "Data" for my model, like:
@JacksonXmlRootElement (localName = "Data")

Is it possible without additional wrapper class?


Friendly reminder to everyone: please don’t mix-up JAXB with JacksonXML. All my problems were from there.

Just add an additional model, like in code below:

@JacksonXmlRootElement(localName = "Transfer")
public class WrapperClass{

   public MyClass myClas;


Answered By – Юрій

Answer Checked By – Terry (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published.