On Monday 06 December 2010 6:20:51 am Bruno Dusausoy wrote: > On Mon, 06 Dec 2010 10:04:12 +0100, Bruno Dusausoy > <[email protected]> wrote: > > [...] > > > Well, you were right, kinda ;). > > My XPath expression was ok, but I had to add a child condition to it, > > > > like this : > > <jaxb:bindings > > > > schemaLocation="xml/schema/Loopbaan/B2BExchanges_V1.xsd" > > > > node="//xs:complexty...@name='Response74LSignalStruct']//xs:eleme...@name > > ='Activities']/xs:complexType"> > > > > <jaxb:class name="ResponseActivities"/> > > > > </jaxb:bindings> > > > > The "/xs:complexType" at the end is what was missing. > > > > Everything's ok now. > > > > Thanks. > > By the way, can someone tell me why the aforementioned solution works ? > Why must I add "/xs:complexType" at the end of the XPath expression ? > > I like to know the why's :).
Well, in JAXB, the generated classes represent the TYPES in the schema. You can have JAXB also generate classes for the Elements (that would then subclass JAXBElement), but normally the generated code just represents the types. The complexType thing above makes the customization properly apply to the type. -- Daniel Kulp [email protected] http://dankulp.com/blog
