cancel
Showing results for 
Search instead for 
Did you mean: 
Subscribe

Hi All,
I have to add namespace in below xml tag:-
Actual xml:-

<sendData>
<MicInterfaceRequest>
  <Connection>
    <connectionID>MICWebService</connectionID>
    <partnerID>MICTest</partnerID>
    <dateTime>2014-02-12T20:00:00.123Z</dateTime>
  </Connection>
</MicInterfaceRequest>

Required xml:-

<MicInterfaceRequest xmlns="urn:http://www.mic-cust.com/Webservice/MicInterface/v1.0">
  <Connection>
    <connectionID>MICWebService</connectionID>
    <partnerID>MICTest</partnerID>
    <dateTime>2014-02-12T20:00:00.123Z</dateTime>
  </Connection>
</MicInterfaceRequest>

Please help how to achieve this using xslt mapping

Regards

Mahesh

0 Likes
View Entire Topic
former_member190293
Active Contributor
0 Likes

Hi Manesh!

<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   

     <xsl:output encoding="UTF-8" indent="yes"/>

     <xsl:template match="/*">

          <xsl:element name="{local-name()}" namespace="urn:http://www.mic-cust.com/Webservice/MicInterface/v1.0">

               <xsl:copy-of select="./*" />

          </xsl:element>

     </xsl:template>

</xsl:stylesheet>

Regards, Evgeniy.