The below xml is not transforming because of xmlns, I tried without xmlns, it working as expected. but i am receiving input with xmlns. Please suggest how can i overcome it.
Requirement: To retrieve productBenefitHeaders from the xml.
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<productData xmlns="http://www.example.org/consolidated">
<productResponse>
<product>
<status>
<isError>false</isError>
</status>
<productBenefit>
<productBenefitCategory>CARDs</productBenefitCategory>
<productBenefitId>12AA</productBenefitId>
<productBenefitHeader>Philips</productBenefitHeader>
</productBenefit>
<productBenefit>
<productBenefitCategory>CARDs</productBenefitCategory>
<productBenefitId>12AB</productBenefitId>
<productBenefitHeader>Samsung</productBenefitHeader>
</productBenefit>
</product>
</productResponse>
<productData>
XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" encoding="UTF-8" omit-xml-declaration="no"/>
<xsl:template match="/">
<xsl:for-each select="productData/productResponse/product/productBenefit">
<xsl:value-of select="productBenefitHeader"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>