"Ander Garcia Gangoiti" <[EMAIL PROTECTED]> wrote on 22-05-2007 
10:06:19:

> Dear All
> 
> I have an xml file similar to the following one, where a nested 
> element depends on and attribute of its father :
> 
> <contact type="friend">
>     <person>
>         <name>Ander</name>
>     <person>
> </contact>
> <contact type="pet">
>     <animal>
>         <type>dog</type>
>         <name>Fibi</name>
>     <animal>
> </contact>
> 
> I would like to express:
> if (contact_type =friend)
>     marshall/unmarshall person
> if (contact_type =pet)
>     marshall/unmarshall pet
> 

As long as you have a class mapping for both the <person> and <animal> 
tags, I would say you should get this automatically.

Reply via email to