title: GO Lang Unable to get XML header in response
body: <p>I have a xml stored in db which i am unmarshalling using xml.unmarshall in GO with the struct I defined.
  When getting the API response I am not getting the XML header and also the namespace.</p>
  <pre><code>type Entity struct {
      XMLName    xml.Name `xml:&quot;entity&quot; json:&quot;-&quot;`
  etc..
      }
  </code></pre>
  <p>while sending response</p>
  <pre><code>func get(c *gin.Context) {
  
  ...
  
  entity=new(model.Entity)
  offeredContentTypes := []string{&quot;application/xml&quot;, &quot;application/json&quot;}
      c.Negotiate(http.StatusOK, gin.Negotiate{
          Offered:  offeredContentTypes,
          XMLData:  entity,
          JSONData: entity,
      })
  }
  </code></pre>
  <p>the xml entity I have in db has the required header as well as namespace</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; standalone=&quot;yes&quot;?&gt;&lt;entity xmlns:ns2=&quot;http://abc/xyz&quot;&gt;....&lt;/entity&gt;
  </code></pre>
  <p>this is the type of response I get</p>
  <pre><code>&lt;entity&gt;...&lt;/entity&gt;
  </code></pre>
  <p>How can I fix this so that i get both xml header as well as namespace??</p>