title: Java: Generating XML sheet from template and dictionary
body: <p>So basically I've been trying to figure this out for a little while, here's the problem:</p>
  
  <p>I have an <code>XML</code> template file, whether it be an <code>XSLT</code> or something different isn't a problem to me since the templates haven't been created yet. But I'm curious how I would take, for example, a dictionary object and fill in the blanks of an <code>XML</code> template with their values.</p>
  
  <p>EXAMPLE:</p>
  
  <p>Let's say I have a pseudo code dictionary:</p>
  
  <pre><code>dict = { "name" : "bob" , 
           "age"  : "100" }
  </code></pre>
  
  <p>and some kind of <code>XML</code> template:</p>
  
  <pre><code>&lt;person&gt;
       &lt;name&gt;&lt;/name&gt;
       &lt;age&gt;&lt;/age&gt;
  &lt;/person&gt;
  </code></pre>
  
  <p>How would I go about, in Java, generating an <code>XML</code> sheet that looks like this:</p>
  
  <pre><code>&lt;person&gt;
        &lt;name&gt;bob&lt;/name&gt;
        &lt;age&gt;100&lt;/age&gt;
  &lt;/person&gt;
  </code></pre>
  
  <p>Again, I am not looking for a super specific answer as I am a capable coder, I was more wondering what a good methodology for doing this is? Is there a good library? Are <code>XLST</code>'s the way to go? and if so where would I go to learn about Java's interaction with them?</p>
  
  <p>Thank you for your time!</p>