This KB article outlines how to remove XML elements using XSLT.
All supported versions of the API Gateway
Given the below XML, this XSLT can be used to remove particular elements from XML. In this example, the "author" and "year" tags will be removed.
You can customize these values to meet your needs.
XML
<bookstore>
<book category="API">
<title lang="en">CA API Management</title>
<author>John Doe</author>
<year>2017</year>
<price>30.00</price>
</book>
</bookstore>
XSLT
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="author|year"/>
</xsl:stylesheet>