title: Take a DOM and re-order nodes and attributes in alphabetical order
body: <p>I'd like to read in an XML document, re-order the nodes and attributes in a deterministic order, e.g.:</p>
  
  <pre><code>&lt;project&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;groupId&gt;com&lt;/groupId&gt;
      &lt;artifactId&gt;foobar&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Becomes:</p>
  
  <pre><code>&lt;project&gt;
      &lt;artifactId&gt;foobar&lt;/artifactId&gt;
      &lt;groupId&gt;com&lt;/groupId&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I'd also like to do attributes too, and indentation!</p>