[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] changing node names in XML
Hi, I need to change the node names in my XML file based on a condition. If a an element has children then the element name has to become "folder", and if an element has no children then its name has to become "leaf". For example : <Employees> <employee name="emp5" id="5"> <employee name="emp2" id="2"> <employee name="emp1" id="1"/> <employee name="emp4" id="4"/> </employee> <employee name="emp3" id="3"/> </employee> </Employees> As : <Employees> <folder name="emp5" id="5"> <folder name="emp2" id="2"> <leaf name="emp1" id="1"/> <leaf name="emp4" id="4"/> </folder> <leaf name="emp3" id="3"/> </folder> </Employees> I wanted to use XSLT. Do you have a hint how can I achieve that ? Thanks vijay XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|