users@jaxb.java.net

Re: custom parse of a child Element

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Tue, 26 Apr 2011 17:02:57 +0200

On 26 April 2011 16:53, Guilhem <guilhem.legal_at_geomatys.fr> wrote:

> Yes in fact, i obtain a ElementNSImpl object in my content.
> So i have to postProcess these element after the unmarshalling, i can't do
> this automitically with the Unmarshaller?
>

Doing it after the unmarshalling is probably the simplest solution. If you
want to investigate other options, look at Unmarshaller.Listener.


> And what about the marshalling ?
>

Create the ElementNSImpl, store it in place, marshal using JAXB.

-W


> Guilhem Legal
>
>
> Le 26/04/2011 16:41, Wolfgang Laun a écrit :
>
> See whether this section of the JAXB tutorial is useful:
>
> http://jaxb.java.net/tutorial/section_2_2_16_1-Elements-With-Any-Type.html#Elements%20With%20Any%20Type
> -W
>
> On 26 April 2011 16:24, <guilhem.legal_at_geomatys.fr> wrote:
> > Hi everybody!
> >
> > I use JAXB for some time now, but there is a use case i can't put in
> > place.
> >
> > In a XML document, i have a dynamic part that i can't parse with JAXB.
> > I have a JAXP XMLStreamReader to do that.
> >
> > How can i plug my JAXP parser in the middle of the JAXB unmarshall ? is
> > it possible?
> >
> > Guilhem Legal
> >
>
>
>