The <map-to> is used primarily for the root element or when no
<bind-xml> exists, or if <bind-xml> has an auto-naming="deriveByClass"
attribute.

<bind-xml name="..."> will override any <map-to xml="..."> element.

That reminds me, we still need to change the name of the "xml"
attribute, since it's really illegal XML. An attribute name is not
supposed to start with 'xml' (case insensitive)

--K

Keld Helbig Hansen wrote:
> 
> This is a question related to the article from DeveloperWorks by Bruce Snyder: 
>"Learn the basics of object-relational binding using Castor", august 2002:
> http://www-106.ibm.com/developerworks/java/library/j-castor/
> 
> Q#3:
> In the mappings file for Product, listing 3, it says:
> 
>      <map-to table="prod" xml="product" />
> 
> What is the reason for using the xml-attribute?
> 
> In other examples you also see this element used inside the field-element:
> 
>       <bind-xml name="name" node="element" />
> 
> Why would you use this element?
> 
> Thanx for any help!!!
> 
> /Keld
> 
> -----------------------------------------------------------
> 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