tags:

views:

35

answers:

1

If I have 3 objects A, B and C. Where A has B which has C, I don't want to show

<a>
  <b>
    <c/>
  </b>
</a>

I want to show

<a>
  <c/>
</a>

Is there any way to do it with JAXB?

+1  A: 

You can implement XmlAdapter<C, B> to marshal the contained C instead of B

axtavt