title: How to 'flatten' a vector to produce multiple XML elements when using serde?
body: <p>I have the following structs:</p>
  
  <pre><code>struct Artist {
      name: String,
      image: String,
  }
  
  struct Album {
      title: String,
      artists: Vec&lt;Artist&gt;,
  }
  </code></pre>
  
  <p>I need to produce XML that looks like:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;album&gt;
    &lt;title&gt;Some title&lt;/title&gt;
    &lt;artist&gt;
      &lt;name&gt;Bonnie&lt;/name&gt;
      &lt;image&gt;http://example.com/bonnie.jpg&lt;/image&gt;
    &lt;/artist&gt;
    &lt;artist&gt;
      &lt;name&gt;Cher&lt;/name&gt;
      &lt;image&gt;http://example.com/cher.jpg&lt;/image&gt;
    &lt;/artist&gt;
  &lt;/album&gt;
  </code></pre>
  
  <p>How can I use serde to serialise/deserialise to the above XML format, specifically regarding flattening the <code>artists</code> vector to produce multiple <code>artist</code> elements? This is a third-party format I can't change :-(</p>