Xml modifying using Linq

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hello,
Im using a MessageInspector to modify a soap xml request sent to a webservice, So far my xml looks like this :
<pre class="prettyprint <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://Services/
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema
<ser:signin>
<ser:email>test</ser:email> <ser:pwd>test</ser:pwd>
</ser:signin>
</s:Body></s:Envelope>[/code]
I need to remove the namespace aliases from signin.descendants so it would look like :

<pre class="prettyprint <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://Services/
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema
<ser:signin>
<email>test</email>
<pwd>test</pwd>
</ser:signin>
</s:Body>
</s:Envelope>[/code]
How can I do that in C# ?
Thanks



View the full article
 
Back
Top