title: Mysql menu to xml
body: <p>I've got DB. I use Zend Navigation to generate the menu. But I want that my menu would be dynamically editable from panel. My menu has also sub-menus. </p>
  
  <p>My db:</p>
  
  <pre><code>id title        parent
  1  First        0
  2  sub_first    1
  3. sub_first_2  1 
  4. second       0
  5. sub_second   4
  </code></pre>
  
  <p>I <strong>want</strong> to export it in XML in that way:</p>
  
  <pre><code>&lt;first&gt;
  
   &lt;sub_first&gt;
   &lt;/sub_first&gt;
  
   &lt;sub_first_2&gt;
   &lt;/sub_first_2&gt;
  
  &lt;/first&gt;
  </code></pre>
  
  <p><strong>How to generate xml from DB which will looks like the one I wrote?</strong></p>