denys
denys

Reputation: 2529

how to marshall/unmarshall Map using jaxb?

f.e. I have an xml:

<a>
  <b id="1">abc</b>
  <b id="22">bzzz</b>
</a>

I want to map it onto
Map < Integer, String >

is it possible with jaxb? If yes - how?

Thank you.

Upvotes: 2

Views: 2777

Answers (1)

forty-two
forty-two

Reputation: 12817

Read documentation for XmlAdapter. It gives you what you want.

Upvotes: 2

Related Questions