Hi
I have following xml input and need to convert to another XML format using XSLT . Please can some help me.
<?xml version = "1.0" encoding = "UTF-8"?>
<Inputs xmlns = "http://www.asd.com/schemas/Service/Schema.xsd">
<row>
<column>
<name>CITY</name>
<value>DELHI</value>
</column>
<column>
<name>EMPID</name>
<value>87676</value>
</column>
<column>
<name>COMPANY</name>
<value>xyz</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>MUMBAI</value>
</column>
<column>
<name>EMPID</name>
<value>97987</value>
</column>
<column>
<name>COMPANY</name>
<value>abc</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>DELHI</value>
</column>
<column>
<name>EMPID</name>
<value>76767</value>
</column>
<column>
<name>COMPANY</name>
<value>jhkjh</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>MUMBAI</value>
</column>
<column>
<name>EMPID</name>
<value>12334</value>
</column>
<column>
<name>COMPANY</name>
<value>nnbn</value>
</column>
</row>
</Inputs>
and I need to convert it to below xml format using xslt. How to achieve this output.
<?xml version = "1.0" encoding = "UTF-8"?>
<ns0utput xmlns:ns0 = "http://www.asd.com/schemas/Service/Schema.xsd">
<ns0:Location>
<ns0:City>MUMBAI</ns0:City>
<ns0:Employee>
<ns0:EMPID>97987</ns0:EMPID>
<ns0:company>abc</ns0:company>
</ns0:Employee>
<ns0:Employee>
<ns0:EMPID>12334</ns0:EMPID>
<ns0:company>nnbn</ns0:company>
</ns0:Employee>
</ns0:Location>
<ns0:Location>
<ns0:City>DELHI</ns0:City>
<ns0:Employee>
<ns0:EMPID>87676</ns0:EMPID>
<ns0:company>xyz</ns0:company>
</ns0:Employee>
<ns0:Employee>
<ns0:EMPID>76767</ns0:EMPID>
<ns0:company>jhkjh</ns0:company>
</ns0:Employee>
</ns0:Location>
</ns0utput>
Please somebody provide me the xslt to achieve the above output.
Thanks in Advance
Dhanya
I have following xml input and need to convert to another XML format using XSLT . Please can some help me.
<?xml version = "1.0" encoding = "UTF-8"?>
<Inputs xmlns = "http://www.asd.com/schemas/Service/Schema.xsd">
<row>
<column>
<name>CITY</name>
<value>DELHI</value>
</column>
<column>
<name>EMPID</name>
<value>87676</value>
</column>
<column>
<name>COMPANY</name>
<value>xyz</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>MUMBAI</value>
</column>
<column>
<name>EMPID</name>
<value>97987</value>
</column>
<column>
<name>COMPANY</name>
<value>abc</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>DELHI</value>
</column>
<column>
<name>EMPID</name>
<value>76767</value>
</column>
<column>
<name>COMPANY</name>
<value>jhkjh</value>
</column>
</row>
<row>
<column>
<name>CITY</name>
<value>MUMBAI</value>
</column>
<column>
<name>EMPID</name>
<value>12334</value>
</column>
<column>
<name>COMPANY</name>
<value>nnbn</value>
</column>
</row>
</Inputs>
and I need to convert it to below xml format using xslt. How to achieve this output.
<?xml version = "1.0" encoding = "UTF-8"?>
<ns0utput xmlns:ns0 = "http://www.asd.com/schemas/Service/Schema.xsd">
<ns0:Location>
<ns0:City>MUMBAI</ns0:City>
<ns0:Employee>
<ns0:EMPID>97987</ns0:EMPID>
<ns0:company>abc</ns0:company>
</ns0:Employee>
<ns0:Employee>
<ns0:EMPID>12334</ns0:EMPID>
<ns0:company>nnbn</ns0:company>
</ns0:Employee>
</ns0:Location>
<ns0:Location>
<ns0:City>DELHI</ns0:City>
<ns0:Employee>
<ns0:EMPID>87676</ns0:EMPID>
<ns0:company>xyz</ns0:company>
</ns0:Employee>
<ns0:Employee>
<ns0:EMPID>76767</ns0:EMPID>
<ns0:company>jhkjh</ns0:company>
</ns0:Employee>
</ns0:Location>
</ns0utput>
Please somebody provide me the xslt to achieve the above output.
Thanks in Advance
Dhanya