users@jaxb.java.net

Removing elements

From: Daniel Kasmeroglu <Daniel.Kasmeroglu_at_Kasisoft.net>
Date: Mon, 08 Jan 2007 02:19:56 +0100

Hi there,
I need to create Java classes according to the following schema:

    ...
    <element name="body">
      ...
        <element name="content">
        </element>
      ...
    </element>

The XJC compiler generates a class for each element, so there's
a hierarchy XXX.Body.Content.XXX . But I'm aware that the element
'body' doesn't provide any content. It's just an additional
hierarchy element (I know that this is odd but the guy who provides
this schema isn't willing to change that). In general this is not
a big problem but I would prefer if there's a way I could make the
'body' element invisible (simplifying the application code).
It is not necessary that this element will be bound to a class.


Thanks for answering.

btw. I've had a look at the binding stuff but I only was capable
to find some little tutorials and the XSD. Nothing which provides
detailed information of the binding (external binding) description.

Ciao
Kasimir