<events>
<main>
<action>modification</action>
<subAction>weights</subAction>
</main>
</events>
<SeriesSet>
<Series id="Price_0">
<seriesBodies>
<SeriesBody>
<DataSeriesBodyType>Do Not Copy</DataSeriesBodyType>
</SeriesBody>
</SeriesBodies>
</Series>
</SeriesSet>
How do i copy all xml and exclude the DataSeriesBodyType element
You just have to use the identity template (as you were using) and then use a template matching DataSeriesBodyType which does nothing.
The code would be:
If you want to normalize the output to remove empty data text nodes, then add to the previous stylesheet the following template: