srini requirement skipping duplicate xml records
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Identity template: copy all nodes and attributes to the output -->
<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:template>
<!-- Main template for MessageProcessingLog -->
<xsl:template match="MessageProcessingLog">
<!-- Check if the current IntegrationFlowName is unique -->
<xsl:if test="not(preceding-sibling::MessageProcessingLog/IntegrationFlowName = IntegrationFlowName)">
<xsl:copy>
<xsl:apply-templates select="@* | node()"/>
</xsl:copy>
</xsl:if>
</xsl:template>
</xsl:stylesheet>
-------------------------------
input and output xml files as follows
<MessageProcessingLogs>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64fDQgBTj83iJoEjYbr8nf9Y</MessageGuid>
<LogStart>2024-02-20T00:00:07.725</LogStart>
<IntegrationFlowName>Push_Business_Partner_to_EventMesh</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>ygXK0d4kgUkLQANYXY2ZDw</MessageGuid>
<LogStart>2024-02-20T00:00:08.699</LogStart>
<IntegrationFlowName>Business_Partner_Distribution_from_S4_to_Salesforce</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65ACL6IgZMNwqqnd4s74t0Z4</MessageGuid>
<LogStart>2024-02-20T00:00:16.549</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT653BdOpXE_XhrM2B1z9ck4f4</MessageGuid>
<LogStart>2024-02-20T00:00:29.018</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66ixXBTLDm6vYmmi-okzjAly</MessageGuid>
<LogStart>2024-02-20T00:00:40.113</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66l456HlCGlgUgx-m6KoNDCQ</MessageGuid>
<LogStart>2024-02-20T00:00:41.808</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>RETRY</Status>
<MessageGuid>riVXgSnNW5mBECcqwMFIow</MessageGuid>
<LogStart>2024-02-20T00:00:07.814</LogStart>
<IntegrationFlowName>Replicate_Business_Partner_to_E2Open</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT67N_BOctsaD5A71S31jzjoa-</MessageGuid>
<LogStart>2024-02-20T00:00:51.451</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>RETRY</Status>
<MessageGuid>JXt7BH0G-PSEPlRfxdPzxw</MessageGuid>
<LogStart>2024-02-20T00:00:24.287</LogStart>
<IntegrationFlowName>Replicate_Business_Partner_to_E2Open</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>4cnwqe9bIjvd2Ykkzl7tgQ</MessageGuid>
<LogStart>2024-02-20T00:00:07.809</LogStart>
<IntegrationFlowName>Business_Partner_Distribution_from_S4_to_Salesforce</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64gUd4mxa8cb1aEYPeznPCzx</MessageGuid>
<LogStart>2024-02-20T00:00:08.668</LogStart>
<IntegrationFlowName>Push_Business_Partner_to_EventMesh</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64hH0VTKVVZgt3sipZhg-ePD</MessageGuid>
<LogStart>2024-02-20T00:00:08.248</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64veRKDQoc2j4ttSnLXKoGOI</MessageGuid>
<LogStart>2024-02-20T00:00:11.086</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64yDW188Uccu6CUF9QXGplEv</MessageGuid>
<LogStart>2024-02-20T00:00:12.917</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64_8Sw_3-0A3HPmk4mKAmVxY</MessageGuid>
<LogStart>2024-02-20T00:00:15.297</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65NHlj9z9B974V_vvASQw5OK</MessageGuid>
<LogStart>2024-02-20T00:00:19.310</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65QZULFONpVTXCDEF4eQi04E</MessageGuid>
<LogStart>2024-02-20T00:00:20.610</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65fTq39gfHUiLMiF-BGR-4lb</MessageGuid>
<LogStart>2024-02-20T00:00:23.249</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65jtuJUlXds88DuuQuNIxNV6</MessageGuid>
<LogStart>2024-02-20T00:00:24.726</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65uLsi8YBJ0uqeVpyytLqpcD</MessageGuid>
<LogStart>2024-02-20T00:00:27.609</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT658eIdaywRWPS2ahnPGMY7Gy</MessageGuid>
<LogStart>2024-02-20T00:00:31.747</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66GFR9j1uv0qJT7D55BhVZGL</MessageGuid>
<LogStart>2024-02-20T00:00:33.414</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66RsYEIqyf5jKBvZKGFP6Wbf</MessageGuid>
<LogStart>2024-02-20T00:00:36.076</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66UwXJJOnGCoYUC3VwKT8i3k</MessageGuid>
<LogStart>2024-02-20T00:00:37.479</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66y5NGE4q6nM9DKjKRnp3oov</MessageGuid>
<LogStart>2024-02-20T00:00:44.355</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT663vgYPFQaDvKKfCUrHL52A_</MessageGuid>
<LogStart>2024-02-20T00:00:45.821</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT67AfsgdG2UuzpQROZKNlMGv5</MessageGuid>
<LogStart>2024-02-20T00:00:48.536</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT67Yvqz9u3ngxXSqmPzYRRiA2</MessageGuid>
<LogStart>2024-02-20T00:00:54.357</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT67fpjkbNSfEYr_BE7YXWkxax</MessageGuid>
<LogStart>2024-02-20T00:00:55.652</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT67q13W2uIqAZL-Z1NrQJgkzX</MessageGuid>
<LogStart>2024-02-20T00:00:58.791</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
</MessageProcessingLogs>
--------------
<MessageProcessingLogs>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT64fDQgBTj83iJoEjYbr8nf9Y</MessageGuid>
<LogStart>2024-02-20T00:00:07.725</LogStart>
<IntegrationFlowName>Push_Business_Partner_to_EventMesh</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>ygXK0d4kgUkLQANYXY2ZDw</MessageGuid>
<LogStart>2024-02-20T00:00:08.699</LogStart>
<IntegrationFlowName>Business_Partner_Distribution_from_S4_to_Salesforce</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT65ACL6IgZMNwqqnd4s74t0Z4</MessageGuid>
<LogStart>2024-02-20T00:00:16.549</LogStart>
<IntegrationFlowName>Global_Exception_Handling</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>COMPLETED</Status>
<MessageGuid>AGXT66ixXBTLDm6vYmmi-okzjAly</MessageGuid>
<LogStart>2024-02-20T00:00:40.113</LogStart>
<IntegrationFlowName>Send_Messages_to_E2Open_API</IntegrationFlowName>
</MessageProcessingLog>
<MessageProcessingLog>
<Status>RETRY</Status>
<MessageGuid>riVXgSnNW5mBECcqwMFIow</MessageGuid>
<LogStart>2024-02-20T00:00:07.814</LogStart>
<IntegrationFlowName>Replicate_Business_Partner_to_E2Open</IntegrationFlowName>
</MessageProcessingLog>
</MessageProcessingLogs>