title: Updating webbrowser content with SVG
body: <p>I am using a webbrowser control to display an SVG file created in my program and saved in a public variable as XMLdocument. Now I want to edit my SVG and load the new file in the webbrowser control.</p>
  
  <p>this is my the variable I am using</p>
  
  <pre><code>Public XSchemaSVG As New XmlDocument
  </code></pre>
  
  <p>And when I populate it and load it in my webbrowers everything works then when I want an updated version I use the following code to reload the SVG</p>
  
  <pre><code>  Public Sub DrawSVGinWebBrowserControl()
  
      Dim text As String = XSchemaSVG.InnerXml
      WebBrowser1.DocumentText = "&lt;!DOCTYPE HTML&gt;&lt;html&gt;&lt;head&gt;&lt;meta http-equiv=""x-ua-compatible"" content=""IE=11""&gt;&lt;meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""&gt;&lt;title&gt;SVG overzicht&lt;/title&gt; &lt;/head&gt;&lt;body&gt;" &amp; text &amp; "&lt;/body&gt;&lt;/html&gt;"
  
  End Sub
  
  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      'Clear XSchemaSVG
      XSchemaSVG.RemoveAll()
      'Draw new SVG in XSchemaSVG
      DrawOverzichtSVG()
      'load new SVG in webbrowser control 
      DrawSVGinWebBrowserControl()
  
  End Sub
  </code></pre>
  
  <p>But the picture in the webbrowser control doesnt change. I think it has either something to do with the way I clear the XMLdocument or the way I load it in the webbrowser control, can anyone help me out here and tell me what I am doing wrong? and how to fix it?</p>
  
  <p>Edit: So I checked and I can validate that my XMLdocument is getting updated. so the problem lies in the reloading of the webbrowser control.</p>