You'll need to use an XSLT stylesheet first.

Something like the following:

<xsl:stylesheet ...>

  ...
  <xsl:template match="customer">
    <service>
       <name><xsl:value-of select="firstname"/> <xsl:value-of
select="lastname"/></name>
       <organization>
         <xsl:apply-templates/>
       </organization>
    </service>
  </xsl:template>
  ...   
</xsl:stylesheet>

--Keith

Jayadev Gali wrote:
> 
> Hi,
> 
> I am new to castor and Could you please tell me is the following mapping
> possible through castor mapping (basically transformations)
> 
> i have an  xml file like this.
> 
> <customer>
>     <firstName>firstname</firstName>
>     <lastName>lastname</lastName>
>     <address1>address1</address1>
>     <address2>address2</address2>
>     <address3>address3</address3>
> </customer>
> 
> using a mapping.xml file is it possible to convert the above xml file to
> 
> <service>
>     <name>firstName lastName</name> <!-- i need to concatinate two
> fields -->
>     <organization>                                            <!-- i
> need to change the tag names of the fields -->
>         <streetName>address1</streetName>
>         <cityName>address1</cityName>
>         <countryName>address1</countryName>
>     </organization>
> </service>
> 
> Regards
> Jayadev
> 
> -----------------------------------------------------------
> 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