xsl-list
[Top] [All Lists]

[xsl] extracting and removing an element nested at different levels

2012-09-04 16:56:38
I have XML consisting of <Item> elements that have nested <Item> elements at various depths within the tree, in its simplest form something like:

<List>
   <Item>
       <ElementA>
           <Item>
               <ElementB/>
           </Item>
       </ElementA>
   </Item>
</List>

That I want to render as:

<List>
   <Item>
       <ElementA/>
   </Item>
   <Item>
       <ElementB/>
   </Item>
</List>

Is there a general technique I can use to remove nested <Item> elements whatever their depth and place all <Item> elements at the same level within the <List>?
Thanks,
Mark


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--