Further investigation lead me to see that different name of the tags is
unacceptable and will throw an exception but in case of missing tag it will
do nothing. My castor version is quite old 0.9.5.3 , i tried with 1.2 and in
case of missing tag it will produce null .



myth_drannon wrote:
> 
> Some strange behavior that I noticed 
> with for example this schema of mapping
> <?xml version="1.0"?>
>    ...
>    <class name="Foo">
>       <field name="bar" type="Bar">
>          <bind-xml name="bar" location="abc"/>
>       </field>
>    </class>
>    ...
> </mapping>
> 
> I can unmarshal :
> 
> <?xml version="1.0"?>
> <foo>
>    <abc>
>       <bar>...</bar>
>    </abc>
> </foo>
> 
> but I also can use no <abc> tags at all and it will still accept or a
> different tag !
> 
> <?xml version="1.0"?>
> <foo>
>    
>       <bar>...</bar>
>    
> </foo>
> or 
> 
> <?xml version="1.0"?>
> <foo>
>    <badTag>
>       <bar>...</bar>
>    </badTag>
> </foo>
> 
> 
> it basically ignores the tag , how I can sort of require it ?
> 
> Thank you.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/location-attribute-ignores-tag-missing-or-wrong-tags-tp19077242p19078024.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to