title: How to serialize a List<T> into XML?
body: <p>How to convert this list:</p>
  
  <pre><code>List&lt;int&gt; Branches = new List&lt;int&gt;();
  Branches.Add(1);
  Branches.Add(2);
  Branches.Add(3);
  </code></pre>
  
  <p>into this XML:</p>
  
  <pre><code>&lt;Branches&gt;
      &lt;branch id="1" /&gt;
      &lt;branch id="2" /&gt;
      &lt;branch id="3" /&gt;
  &lt;/Branches&gt;
  </code></pre>