Returning XmlDocument from an XmlElement
<p>I am new to C# and I'm not sure if all the details are here. </p>

<p>Initially, I was supposed to send a SOAP request and read its response into a dataset.</p>

<p>The following code worked:</p>

<pre><code>DataSet ds = new DataSet(); 
cred.CredExecution mycredit = new cred.CredExecution();
ds = mycredit.RetrieveParsedRawData(inquiry, true);
// I have the Web Reference "cred" added to the project.
// Since I wasn't sure if a service reference was needed, I added that too.
</code></pre>

<p>Now the response format has changed to XML, and I'm not sure how to read it.</p>

<p>I changed the code as follows:</p>

<pre><code>System.Xml.XmlDocument XmlDoc = new System.Xml.XmlDocument();
cred.CredExecution mycredit = new cred.CredExecution();
XmlDoc = mycredit.RetrieveParsedRawData(inquiry, true);
</code></pre>

<p>But it fails with the error:</p>

<blockquote>
  <p><em>Cannot implicitly convert type 'System.Xml.XmlElement' to 'System.Xml.XmlDocument'</em></p>
</blockquote>

<p>I tried using:</p>

<pre><code>System.Xml.XmlElement XmlEle = new System.Xml.XmlElement();
</code></pre>

<p>but the system fails saying it is protected.</p>
