# C1.Win.Xml.XmlDocumentExt.LoadStream

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Xml_XmlDocumentExt_LoadStream_" data-uid="C1.Win.Xml.XmlDocumentExt.LoadStream*">LoadStream Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Xml_XmlDocumentExt_LoadStream_" data-uid="C1.Win.Xml.XmlDocumentExt.LoadStream*"></a>
<h4 id="C1_Win_Xml_XmlDocumentExt_LoadStream_System_Xml_XmlDocument_System_IO_Stream_System_Xml_XmlReaderSettings_" data-uid="C1.Win.Xml.XmlDocumentExt.LoadStream(System.Xml.XmlDocument,System.IO.Stream,System.Xml.XmlReaderSettings)">LoadStream(XmlDocument, Stream, XmlReaderSettings)</h4>
<div class="markdown level1 summary"><p>Loads the XML document from the specified <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void LoadStream(this XmlDocument document, Stream stream, XmlReaderSettings settings = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub LoadStream(document As XmlDocument, stream As Stream, Optional settings As XmlReaderSettings = Nothing)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><span class="xref">XmlDocument</span></td>
      <td><span class="parametername">document</span></td>
      <td><p>The <span class="xref">System.Xml.XmlDocument</span> instance to populate with the XML data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The input <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.io.stream">Stream</a> containing the XML content to load.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">XmlReaderSettings</span></td>
      <td><span class="parametername">settings</span></td>
      <td><p>Optional <span class="xref">System.Xml.XmlReaderSettings</span> that specify how the XML is read, such as validation,
whitespace handling, or security settings. If <code>null</code>, the default settings are used.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
