Hello,
I have a similar question but with jaxb2 annotation (I am using jaxb2
annotation + Spring Web Service):
I have a legacy xml:
<product>
<res>
<usprice>
....
</usprice>
</res>
</product>
And I want my Java class to be (I don't care about the <res> tag):
class Product {
protected USPrice price;
}
Can I do something like this:
@XmlElement(name="res//usprice")
protected USPrice price;
Meaning specifying the node and sub-node name in the annotation directly?
Thanks in advance,
Yves.
Hanson Char wrote:
>
> Hi Daniel,
>
> Have you looked at the samples that come bundled with the RI download ?
> They work well for me :)
>
> Hanson
>
> On 1/7/07, Daniel Kasmeroglu <Daniel.Kasmeroglu_at_kasisoft.net> wrote:
>>
>> 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
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
>> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Removing-elements-tf2936940.html#a8235894
Sent from the java.net - jaxb users mailing list archive at Nabble.com.