title: XmlDocument to read XML file, passed as SOAP message body
body: <p>I am using XmlDocument to read an XML document's contents and then pass those contents along in the SOAP message body of a web service request. However, in the data that is actually getting passed along in the call (that was read from the XML document) the &lt; and > symbols are being replaced with</p>
  
  <pre><code>&amp;gt; and &amp;lt; 
  </code></pre>
  
  <p>which is causing issues on the receiving end. </p>
  
  <p>What am I missing?</p>
  
  <p>Here is a snippet of my code:</p>
  
  <pre><code>string filePath = FileList.SelectedItem.Value;
  string doc = File.ReadAllText(filePath);
  
  XmlDocument xDoc = new XmlDocument { PreserveWhitespace = true };
  xDoc.LoadXml(doc);
  
  
  MyService.TransactionRequest request = new MyService.TransactionRequest { message = xDoc.OuterXml };
  
  
  MyService.TransactionClient client = new MyService.TransactionClient();
  
  
  client.ProcessTransaction(request);
  </code></pre>
  
  <p>Thanks for any and all help.</p>