title: Creating this XML in C#
body: <p>I have used <code>XmlDocument</code> before to generate basic Xml before, however I am struggling to recreate the following XML via code. The main problem seems to be around adding the namespaces to the description section.</p>
  
  <p>How do I create the following example XML file?</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;pndsdc:description
           xmlns:dc="http://purl.org/dc/elements/1.1/"
           xmlns:dcterms="http://purl.org/dc/terms/"
           xmlns:pndsterms="http://purl.org/mla/pnds/terms/"
           xmlns:pndsdc="http://purl.org/mla/pnds/pndsdc/"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://purl.org/mla/pnds/pndsdc/
                               http://www.ukoln.ac.uk/metadata/pns/pndsdcxml/2005-06-13/xmls/pndsdc.xsd"
  &gt;
      &lt;dc:identifier encSchemeURI="http://purl.org/dc/terms/URI"&gt;http://example.org/my/docs/12345/&lt;/dc:identifier&gt;
      &lt;dc:title xml:lang="en"&gt;Everything you wanted to know about identity, but were afraid to ask&lt;/dc:title&gt;
      &lt;dc:description xml:lang="en"&gt;The article provides a summary of the 2003 White Paper on identity cards for the UK
      with a critique from the perspective of several national and international civil liberties organisations.&lt;/dc:description&gt;
      &lt;dc:subject&gt;Identity cards&lt;/dc:subject&gt;
      &lt;dc:subject&gt;Civil liberties&lt;/dc:subject&gt;
  
      &lt;dc:subject&gt;Human rights&lt;/dc:subject&gt;
      &lt;dc:type encSchemeURI="http://purl.org/dc/terms/DCMIType" valueURI="http://purl.org/dc/dcmitype/Text"&gt;Text&lt;/dc:type&gt;
      &lt;dcterms:license valueURI="http://creativecommons.org/licenses/by-nc-nd/2.0/uk/" /&gt;
      &lt;dcterms:rightsHolder&gt;The National Campaign Against Identity Cards&lt;/dcterms:rightsHolder&gt;
      &lt;dcterms:spatial encSchemeURI="http://purl.org/dc/terms/TGN"&gt;World, Europe, United Kingdom&lt;/dcterms:spatial&gt;
  &lt;/pndsdc:description&gt;
  </code></pre>
  
  <p>Code can also be <a href="http://www.ukoln.ac.uk/metadata/pns/pndsdcxml/2005-06-13/xml/ex0.xml" rel="nofollow">found here online</a>. </p>