title: Replace images with alternate text html agility pack
body: <p>I need to parse HTML for images and replace those tags with a new tag that just has the text that is contained in the alternate. Can someone show how to do this with both linq and standard usage?</p>
  
  <p>I've using a linq sample now to replace paragraphs. But, I'm getting a read only error.</p>
  
  <pre><code>    HtmlDocument doc = new HtmlDocument();
      doc.LoadHtml(html);      
      IEnumerable&lt;HtmlNode&gt; paragraphs = doc.DocumentNode.DescendantNodes().Where(p =&gt; p.Name.ToLower() == "p");
      foreach (HtmlNode p in paragraphs)
      {
          p.InnerText = "Hello World";
      }
  </code></pre>
  
  <p>Also is there an easy way to transfer it back to text? I.e Output as string</p>
  
  <p>This is what I have which doesn't work</p>
  
  <pre><code>MemoryStream outStream = new MemoryStream();
  doc.Save(outStream);
  
  
  outStream.Seek(0, SeekOrigin.Begin);
  StreamReader reader = new StreamReader( outStream );
  string text = reader.ReadToEnd();
  </code></pre>