I have below XMl:
<soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns="http:test/201/2"
xmlns:m0="http:test/201/3"
xmlns:ns0="http:test/201/4"
xmlns:ns2="http:test/201/5"
xmlns:ns1="http:test/201/6"
xmlns:ns3="http:test/201/7"
xmlns:ns6="http:test/201/8"
xmlns:ns4="http:test/201/9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap:Header>
<ns0:ResponseHeader>
<ns:Env>Dev</ns:Env>
<ns:Version>1</ns:Version>
<ns:Server></ns:Server>
<ns:Name>NAME</ns:Name>
</ns0:ResponseHeader>
</soap:Header>
<soap:Body>
<ns2:ResponseData>
<ns2:Employee >
<ns2:MessageList xsi:type="ns3:Info">
<ns2:Message>
<ns4:Type>new</ns4:Type>
<ns4:Code>2</ns4:Code>
<ns4:Source>Emp</ns4:Source>
<ns4:Description>new hire</ns4:Description>
</ns2:Message>
</ns2:MessageList>
<ns2:MessageList xsi:type="ns3:Info">
<ns2:Message>
<ns4:Type>new</ns4:Type>
<ns4:Code>1</ns4:Code>
<ns4:Source>contract</ns4:Source>
<ns4:Description>new hire</ns4:Description>
</ns2:Message>
</ns2:MessageList>
</ns2:Employee>
</ns2:ResponseData>
</soap:Body>
</soap:Envelope>
My Requirement is, copy complete input xml elements and attributes to output xml include all namespaces except xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/". So Desire Output is:
My Requirement is, copy complete input xml elements and attributes to output xml include all namespaces except xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/". So Desire Output is:
<Envelope
xmlns:ns="http:test/201/2"
xmlns:m0="http:test/201/3"
xmlns:ns0="http:test/201/4"
xmlns:ns2="http:test/201/5"
xmlns:ns1="http:test/201/6"
xmlns:ns3="http:test/201/7"
xmlns:ns6="http:test/201/8"
xmlns:ns4="http:test/201/9"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header>
<ns0:ResponseHeader>
<ns:Env>Dev</ns:Env>
<ns:Version>1</ns:Version>
<ns:Server></ns:Server>
<ns:Name>NAME</ns:Name>
</ns0:ResponseHeader>
</Header>
<Body>
<ns2:ResponseData>
<ns2:Employee >
<ns2:MessageList xsi:type="ns3:Info">
<ns2:Message>
<ns4:Type>new</ns4:Type>
<ns4:Code>2</ns4:Code>
<ns4:Source>Emp</ns4:Source>
<ns4:Description>new hire</ns4:Description>
</ns2:Message>
</ns2:MessageList>
<ns2:MessageList xsi:type="ns3:Info">
<ns2:Message>
<ns4:Type>new</ns4:Type>
<ns4:Code>1</ns4:Code>
<ns4:Source>contract</ns4:Source>
<ns4:Description>new hire</ns4:Description>
</ns2:Message>
</ns2:MessageList>
</ns2:Employee>
</ns2:ResponseData>
</Body>
</Envelope>