loisshocking
New Member
I have the below xml messages created by Tibco\[code\]<?xml version="1.0" encoding="UTF-8"?><SalesInData> <COMPANYID>AIN2003</COMPANYID> <ENDDATE>20120825</ENDDATE> <FILENAME>2-SG4_2244_20120815.xml</FILENAME> <SalesInRecord> <ROW_NUM>7</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45685</HP_PRODUCT_ID> <LOCATION_ID/> <LOCATION_NAME>XYZ XY</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> </SalesInRecord> <STARTDATE>20120819</STARTDATE> <SUBMITDATE>20120827</SUBMITDATE></SalesInData><?xml version="1.0" encoding="UTF-8"?><SalesInData> <COMPANYID>AIN2003</COMPANYID> <ENDDATE>20120825</ENDDATE> <FILENAME>2-SG4_2244_20120815.xml</FILENAME> <SalesInRecord> <ROW_NUM>1</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45678</HP_PRODUCT_ID> <LOCATION_ID>2-PQL-3401</LOCATION_ID> <LOCATION_NAME>XYZ el</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> </SalesInRecord> <STARTDATE>20120819</STARTDATE> <SUBMITDATE>20120827</SUBMITDATE></SalesInData><?xml version="1.0" encoding="UTF-8"?><SalesInData> <COMPANYID>AIN2003</COMPANYID> <ENDDATE>20120825</ENDDATE> <FILENAME>2-SG4_2244_20120815.xml</FILENAME> <SalesInRecord> <ROW_NUM>1</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45678</HP_PRODUCT_ID> <LOCATION_ID>2-PQL-3401</LOCATION_ID> <LOCATION_NAME>XYZ el</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> </SalesInRecord> <STARTDATE>20120819</STARTDATE> <SUBMITDATE>20120827</SUBMITDATE></SalesInData>\[/code\]but expected output will be: \[code\]<?xml version="1.0" encoding="UTF-8"?><SalesInData> <COMPANYID>AIN2003</COMPANYID> <ENDDATE>20120825</ENDDATE> <FILENAME>2-SG4_2244_20120815.xml</FILENAME> <SalesInRecord> <ROW_NUM>7</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45685</HP_PRODUCT_ID> <LOCATION_ID/> <LOCATION_NAME>XYZ XY</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> <GOODS_RECIVED_DATE/> </SalesInRecord> <SalesInRecord> <ROW_NUM>1</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45678</HP_PRODUCT_ID> <LOCATION_ID>2-PQL-3401</LOCATION_ID> <LOCATION_NAME>XYZ el</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> <GOODS_RECIVED_DATE/> </SalesInRecord> <SalesInRecord> <ROW_NUM>1</ROW_NUM> <BUY_QTY>5</BUY_QTY> <HP_PRODUCT_ID>Apj45678</HP_PRODUCT_ID> <LOCATION_ID>2-PQL-3401</LOCATION_ID> <LOCATION_NAME>XYZ el</LOCATION_NAME> <UNIT_BUY_PRICE>999999999</UNIT_BUY_PRICE> <GOODS_RECIVED_DATE/> </SalesInRecord> <STARTDATE>20120819</STARTDATE> <SUBMITDATE>20120827</SUBMITDATE></SalesInData>\[/code\]but i want to transform this individual xml records which are created in tibco into single xml document with XSLT as shown above. please provide the code that can perform the task. there are some other elements which can be null.