title: How to read XML file using System.IO.Stream with LINQ
body: <p>I will be passing the xml file like this:</p>
  <pre><code>File1.PostedFile.InputStream 
  
  //reading xml file.....
  public static void readXMLOutput(Stream stream)
  {
  
      System.Xml.Linq.XDocument xml = System.Xml.Linq.XDocument.Load(stream);
  
      var query = from p in xml.Element(&quot;ste&quot;).Element(&quot;Application&quot;)
                  //where (int)p.Element(&quot;Id&quot;) == 1
                  select Page;
  
      foreach (var record in query)
      {
          Response.Write(&quot;dfe&quot;) + record.Element(&quot;dfe&quot;).Value;
      }
  </code></pre>
  <p>error:</p>
  <blockquote>
  <p>Error  1   The best overloaded method match for 'System.Xml.Linq.XDocument.Load(string)' has some invalid arguments</p>
  <p>cannot convert from 'System.IO.Stream' to 'string'</p>
  </blockquote>