Hi all,
I am new to XSLT .can anyone pls help me in the below query.I need to remove uncessary elements from my xml. I checked out a couple of functions but not sure how to use it.Eg:
functx:remove-elements-deep
Existing xml
Code:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header></soapenv:Header>
<soapenv:Body>
<soapenv:Fault>
<faultcode
xmlns:p377="http://complextypes.app.esb.bac.com">p377:FaultException</faultcode>
<faultstring>
<faultcode>Client.KeyNotFoundException</faultcode>
<faultstring>Record not Found</faultstring>
<faultactor>APP</faultactor>
<detail>
<osaFaultDetail>
<traceId>EF54DF6A4CCE-58365984</traceId>
<component>Ret</component>
<service>
<name>Retr</name>
<operation>Retr</operation>
<version>V001</version>
</service>
<serverInstance>XXX</serverInstance>
<timestamp>2009-04-27T21.47.38</timestamp>
<request>RetRequest</request>
</osaFaultDetail>
</detail>
</faultstring>
<detail encodingStyle="">
<p377:FaultException
xmlns:p377="http://complextypes.app.esb.bac.com">
<p377:faultcode>Client.KeyNotFoundException</p377:faultcode>
<p377:faultstring>Record not Found</p377:faultstring>
<p377:faultactor>APP</p377:faultactor>
<p377:osaFaultDetail>
<p377:traceId>EF54DF6A4CCE-58365984</p377:traceId>
<p377:component>Ret</p377:component>
<p377:service>
<p377:name>Retr</p377:name>
<p377:operation>Retr</p377:operation>
<p377:version>V001</p377:version>
</p377:service>
<p377:serverInstance>XXX</p377:serverInstance>
<p377:timestamp>2009-04-28T02:47:38.148Z</p377:timestamp>
<p377:request>RetRequest</p377:request>
</p377:osaFaultDetail>
</p377:FaultException>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Required XML
Code:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header></soapenv:Header>
<soapenv:Body>
<soapenv:Fault>
<faultcode
xmlns:p377="http://complextypes.app.esb.bac.com">p377:FaultException</faultcode>
<faultstring>
<faultcode>Client.KeyNotFoundException</faultcode>
<faultstring>Record not Found</faultstring>
<faultactor>APP</faultactor>
<detail>
<osaFaultDetail>
<traceId>EF54DF6A4CCE-58365984</traceId>
<component>Ret</component>
<service>
<name>Retr</name>
<operation>Retr</operation>
<version>V001</version>
</service>
<serverInstance>XXX</serverInstance>
<timestamp>2009-04-27T21.47.38</timestamp>
<request>RetRequest</request>
</osaFaultDetail>
</detail>
</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>