xsl-list
[Top] [All Lists]

[xsl] save specific nodes from the tree and form a xml

2007-09-04 23:35:46
Hi All,
Suppose orig.xml is as below,
<Root>
    <Parent>
         <Child1 Apply="1">
              <Value>100</Value>
         </Child1>
         <Node2>
               <Value>0</Value>
         </Node2>
     </Parent>
</Root>

I need to save only the nodes which has the flag "Apply=1" along with
the complete hierarchy in another xml file. And not its other
children.

-->new.xml would be as,
<Root>
    <Parent>
         <Child1 Apply="1">
              <Value>100</Value>
         </Child1>
     </Parent>
</Root>

I just used a simple example here. Actually the original xml file will be
a large file.

Please let me know, how the xslt has to be, to transform the orig.xml
to new.xml.

Thanks
Senthil

--~------------------------------------------------------------------
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>
--~--

<Prev in Thread] Current Thread [Next in Thread>
  • [xsl] save specific nodes from the tree and form a xml, Senthil Nathan <=