Serialize a List<KeyValuePair<string, object>>
<p>Let's suppose we have an:</p>

<pre><code>    public List&lt;KeyValuePair&lt;string, object&gt;&gt; Items { get; set; }
</code></pre>

<p>How can we serialize it as follows:</p>

<pre><code>&lt;!--&lt;SomeEnclosingElement&gt;--&gt;
    &lt;Key1&gt;Value1.ToString()&lt;/Key1&gt;
    &lt;Key2&gt;Value2.ToString()&lt;/Key2&gt;
    ...
    &lt;KeyN&gt;ValueN.ToString()&lt;/KeyN&gt;
&lt;!--&lt;/SomeEnclosingElement&gt;--&gt;
</code></pre>

<p>using <code>XmlSerializer</code>, if possible, without custom implementation of <code>IXmlSerializable</code>?</p>

<p>Please note two things:</p>

<ul>
<li>Element (tag) names varies from node to node</li>
<li>No enclosing element needed at all (I commented it above just to better illustrate this requirement)</li>
</ul>