When trying to build SOAP request using XmlDocument
when calling myXmlDocument.OuterXml - it omits the "tns:" which breaks the SOAP request
Simplest code to show the problem follows:
var doc = new XmlDocument();
doc.LoadXml("<Root />");
XmlNode node = doc.CreateElement("tns:MyNode");
string nodeName = node.Name; // "tns:MyNode"
string nodeXml = node.OuterXml; // "<MyNode />"
// Why OuterXml does not show the correct node.Name
when calling myXmlDocument.OuterXml - it omits the "tns:" which breaks the SOAP request
Simplest code to show the problem follows:
var doc = new XmlDocument();
doc.LoadXml("<Root />");
XmlNode node = doc.CreateElement("tns:MyNode");
string nodeName = node.Name; // "tns:MyNode"
string nodeXml = node.OuterXml; // "<MyNode />"
// Why OuterXml does not show the correct node.Name