Subject: Re: [xsl] flattening an xml hierarchy From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Thu, 08 Jan 2009 17:17:14 +0100 |
I'd like to remove some elements from an xml hierachy using xslt:
Original xml example: <Dontwant1> <dontwant2>foo</dontwant2> <x3> <x4>stuff</x4> <y5>more stuff</y5> </x3> </Dontwant1>
Like to have transform output: <x3> <x4>stuff</x4> <y5>more stuff</y5> </x3>
<xsl:template match="@* | node()"> <xsl:copy> <xsl:apply-templates select="@* | node()"/> </xsl:copy> </xsl:template>
<xsl:template match="Dontwant1 | dontwant2"> <xsl:apply-templates select="*"/> </xsl:template>
Martin Honnen http://JavaScript.FAQTs.com/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] flattening an xml hierarc, Houghton,Andrew | Thread | Re: [xsl] flattening an xml hierarc, Tim |
RE: [xsl] flattening an xml hierarc, Houghton,Andrew | Date | Re: [xsl] flattening an xml hierarc, Vasu Chakkera |
Month |