You need to switch to the CVS version of Castor. This has the support
for using attributes with the location attribute in the mapping file.

--Keith

GiaNe wrote:
> 
> hi
> 
> need some help in using location attribute.
> 
> question #1 location="abc" with node="attribute" isn't working:
> 
> I am trying to use location attribute:
> <mapping>
>  <class name="myType" auto-complete="false">
>     <map-to xml="testxml"/>
>  <field name="type" type="java.lang.String">
>  <bind-xml name="type" node="attribute" location="abc"/>
>  </field>
> 
> <!-- This work
>     <field name="type" type="java.lang.String">
>         <bind-xml name="type" location="abc" node="element"/>
>     </field>
> -->
>  </class>
> </mapping>
> 
> marshalling return:
> <testxml/>
> 
> expecting
> <testxml><abc type=INS></abc></testxml>
> 
> if I am using  "node=element" it is ok:
> 
> marshaling return:
> <testxml><abc><type>INS</type></abc></testxml>
> 
> question #2:
> is location attribute support multiple attribute definitions such as:
>  <abc name1="" name2="" >
> 
> I am using version castor-0.9.5.jar
> 
> Thanks
> 
> -----------------------------------------------------------
> If you wish to unsubscribe from this mailing, send mail to
> [EMAIL PROTECTED] with a subject of:
>         unsubscribe castor-dev

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to