title: Default namespace declaration in data weaver
body: <p>I am trying implement the default namespace while creating XML in the data weaver.
  I went thought below data weaver documentation and earlier posts. Could not get any clue on this. How can we declare default namespace.</p>
  
  <p><a href="https://docs.mulesoft.com/mule-user-guide/v/3.7/dataweave-tutorial" rel="nofollow">https://docs.mulesoft.com/mule-user-guide/v/3.7/dataweave-tutorial</a></p>
  
  <p>My input will be from DB - linked list. Output is XML.</p>
  
  <pre><code>%dw 1.0
  %namespace ns0 urn:abc:def:Components
  %output application/xml
  ---
  {
      ns0#University: {
          college: payload.college[0],
          (payload map ((payload01 , indexOfPayload01) -&gt; {
              dept: {
                  deptName: payload01.dept,
                  Noofstudents: payload01."No of students" as :number
              }
          }))
      }
  }
  </code></pre>
  
  <p>Current output is</p>
  
  <pre><code>&lt;ns0:University xmlns:ns0="urn:abc:def:Components"&gt;
  &lt;college&gt;abc&lt;/college&gt; &lt;!-- this is simple tag/ It will not repeat --&gt;
  &lt;dept&gt; &lt;!-- This is complex tag --&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;dept&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;dept&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;/ns0:University&gt;
  </code></pre>
  
  <p>Expected output is</p>
  
  <pre><code>&lt;University xmlns="urn:abc:def:Components"&gt;
  &lt;college&gt;abc&lt;/college&gt; &lt;!-- this is simple tag/ It will not repeat --&gt;
  &lt;dept&gt; &lt;!-- This is complex tag --&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;dept&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;dept&gt;
     &lt;dept Name&gt;IT&lt;/dept Name&gt;
     &lt;No of students&gt;5&lt;/No of students&gt;
  &lt;/dept&gt;
  &lt;University&gt;
  </code></pre>