on 03-20-2024 1:56 PM
Hi Experts,
I am facing a challenge and need your suggestions for the below scenario.
input side XML: <ROOT>
<item>
<Type>S</Type>
<Message>Success</Message>
</item>
<item>
<Type>S</Type>
<Message>Success</Message>
</item>
<item>
<Type>F</Type>
<Message>Failed</Message>
</item>
</ROOT>
likewise multiple items are coming in the input xml and I want to map only the <Type>F</Type> and <Message>Failed</Message> in the target side. How to achieve this.
Best Regards,
Purusottam Agarwal
The following XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:mode on-no-match="shallow-copy"/>
<xsl:template match="item[Type = 'S']"/>
</xsl:stylesheet>
produces this result XML:
<?xml version="1.0" encoding="UTF-8"?>
<ROOT>
<item>
<Type>F</Type>
<Message>Failed</Message>
</item>
</ROOT>
Regards,
Ryan Crosby
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.