Create XMl file in particular format in c# : <p>i want to create xml file in c# in below format.</p>

<p><div class="snippet" data-lang="js" data-hide="false">
<div class="snippet-code">
<pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;custom&gt;
&lt;text1&gt;
&lt;value name="sample1"&gt;hello&lt;/value&gt;
&lt;/text1&gt;
&lt;text1&gt;&lt;value name="sample2"&gt;world&lt;/value&gt; 
&lt;/text1&gt;  
&lt;/custom&gt;</code></pre>
</div>
</div>
</p>
