title: Edit HTML Document with Java
body: <p>I have an HTML document stored in memory (set on a Flying Saucer XHTMLPanel) in my java application.</p>
  
  <pre><code>xhtmlPanel.setDocument(Main.class.getResource("/mailtemplate/DefaultMail.html").toString());
  </code></pre>
  
  <p>html file below;</p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;p id="first"&gt;&lt;/p&gt;
          &lt;p id="second"&gt;&lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I want to set the contents of the <code>p</code> elements. I don't want to set a schema for it to use getDocumentById(), so what alternatives do I have?</p>