Click here to Skip to main content
15,945,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I am trying to manipulate SOAP response.
Basically i a SOAP Response from some other parties, and before inserting the response into database i have do following:
1. remove '_'
2. if all of the text in chile nodes is empty, then remove the parent node from xml.
3. and remove spaces

i should use XDocument. The main problem i have is:
we dont know what are the names of the node, so i couldn't depent on node's name

any suggestions..?

Thank you
Keith Barrow 5-Jun-11 18:05pm    
Do you have access to the SOAP service's WSDL. Everything is much easier when it is in object-land. If you manipulate the SOAP, it will become invalid if signed BTW, and you should sign the message to prevent it being manipulated (breaching security!)

1 solution

If you target the platform to C# 4.0, you can use the power of LINQ to XML[^].

Via LINQ to XML it is very easy to query[^] in XML documents and find the info you need.
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900