Converting an array dict to xml in python?
<p>I have this array that I need to convert to xml.</p>

<pre><code>array = [
    {
        'time': {"hour":"1", "minute":"30","seconds": "40"}
    },
    {
        'place': {"street":"40 something", "zip": "00000"}
    }
]
</code></pre>

<p>The xml should have a title that I can put in as a variable for example,</p>

<pre><code>xml_title = "test"
</code></pre>

<p>The result I want based on the array above and the xml title is this:</p>

<pre><code>&lt;test&gt;
    &lt;time hour="1" minute="30" second="40"&gt;&lt;/time&gt;
    &lt;place&gt;
        &lt;street&gt;40 something&lt;/street&gt;
        &lt;zip&gt;00000&lt;/zip&gt;
    &lt;/place&gt;
&lt;/test&gt;
</code></pre>

<p>I liked the answer given in a similar stack overflow question (<a href="https://stackoverflow.com/a/18991263/875139">https://stackoverflow.com/a/18991263/875139</a>) but I am confused how I can use that answer to get this desired result.</p>

<p>Help please.</p>