XSLT output not as expected

后端 未结 1 1201
有刺的猬
有刺的猬 2021-01-26 07:33

I have a requirement to remove parent xml nodes and copy entire xml inside node. I have written a xslt code it, however, it is not working as expected.

Input XML:

相关标签:
1条回答
  • 2021-01-26 07:45

    In XSLT 2 or 3 you can use

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        exclude-result-prefixes="#all"
        version="3.0">
    
     <xsl:template match="/">
         <xsl:copy-of select="//ns3:Response" copy-namespaces="no" xmlns:ns3="urn:enoc.com:HTRUAE:EmployeeLeavesData_Portal"/>
     </xsl:template>
     
    </xsl:stylesheet>
    
    0 讨论(0)
提交回复
热议问题