Can I promote an element by not copying a parent?
I'm in a situation of using an identity template to take everything in my XML file by default, except for a couple of things that I choose not to copy. That part works for simple leaf elements.
But what if the element has children, and I want to keep the children? In other words:
<A>
<B>
<C>Foo</C>
</B>
<B>
<C>Bar</C>
</B>
</A>
What's the trick for leaving out B, and just producing:
<A>
<C>Foo</C>
<C>Bar</C>
</A>
I tried matching a template on //B/* and then just using a copy-of ".", but that didn't work.
|