0

I want to write a basic test tool that will build some soap request by merging the headers and body of xml, and than checks the result. But when I inspect the xml request examples of soap I see that xml nodes have a prefix like "soapenv" or "s" ..

For example:

<soapenv:Header>

or

<s:Header>

1) Is there a way to reject prefix and select node with only key "Header" ? And than insert a string xml to header ?

2) What is the reason of this prefix ? Why it changes ?

rastbin
  • 95
  • 8
  • 1. Does [this](http://stackoverflow.com/a/988325/4684493) help? 2. [This](http://programmers.stackexchange.com/questions/122002/why-do-we-need-uris-for-xml-namespaces) may help to explain. – Hintham Aug 16 '16 at 08:56
  • use xml linq : XDocument doc = XDocument.Parse("your xml string"); XElement header = doc.Descendants().Where(x => x.Name.LocalName == "Header").FirstOrDefault(); – jdweng Aug 16 '16 at 09:38

0 Answers0