title: Sort XML in alphabetic Order
body: <p>I have an xml config file: </p>
  
  <pre><code> &lt;icecast&gt;
      &lt;mount&gt;
      &lt;mount-name&gt;/yourradio.mp3&lt;/mount-name&gt;
      &lt;accesslog&gt;
      &lt;name&gt;/access/yourradio/yourradiomp3.log&lt;/name&gt;
      &lt;duration&gt;86400&lt;/duration&gt;
      &lt;archive&gt;true&lt;/archive&gt;
      &lt;size&gt;20000000&lt;/size&gt;
      &lt;/accesslog&gt;
      &lt;/mount&gt;
  
      &lt;mount&gt;
      &lt;mount-name&gt;/aire.mp3&lt;/mount-name&gt;
      &lt;accesslog&gt;
      &lt;name&gt;/access/yourradio/yourradiomp3.log&lt;/name&gt;
      &lt;duration&gt;86400&lt;/duration&gt;
      &lt;archive&gt;true&lt;/archive&gt;
      &lt;size&gt;20000000&lt;/size&gt;
      &lt;/accesslog&gt;
      &lt;/mount&gt;
   &lt;/icecast&gt;
  </code></pre>
  
  <p>How can I sort this in alphabetic order using the <code>&lt;mount-name&gt;</code> as the sorting element and output it back into xml. I have seen you can do some stuff with xmllint using a xslt but I cant seem to get my head around it and get it to work. </p>
  
  <p>Ideally would love to be able to run this in a bash script to then sort all of the mounts I have in a configuration file. </p>
  
  <p>Thank you for all of your help! </p>