Change tag names and remove element for a certain value

blueD

New Member
Am not able to traverse child element. In the below input XML, I have to take only element \[code\]<e>\[/code\] and replace that with \[code\]<se>\[/code\] and need to remove one element \[code\]<e>\[/code\] if value equals to "DB1". Can someone help on this please? Am new to XSLT.Input XML:\[code\]<a xmlns="http://examle.com/test/2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <b> <c name="RES" type="KSD"> <d> <e>DB1</e> <e>DB2</e> <e>DB3</e> </d> </c> </b> <error count="0" success="OK"> </error></a>\[/code\]The desired output XML is:\[code\]<?xml version="1.0" encoding="utf-8" ?><Payload xmlns="http://example.com/test/2.0"xmlns:xs="http://www.w3.org/2001/XMLSchema" > <response> <allot>8</allot> <size>200</size> <ses> <se>DB2</se> <se>DB3</se> </ses> </response></Payload>\[/code\]
 
Back
Top