title: Unmarshal XML Into a Map
body: <p>As the title states I am trying to unmarshal my XML directly into a map instead of having to first unmarshal into a struct and then convert the struct into a map. I am dealing a fairly large data set and the dual conversion is taking more time than desired.</p>
  
  <p>If anyone could provide any guidance on this at all it would be greatly appreciated.</p>
  
  <p>XML: The classAccesses repeat and there are a few other elements. </p>
  
  <pre><code>&lt;classAccesses&gt;
      &lt;apexClass&gt;AccountRelationUtility&lt;/apexClass&gt;
      &lt;enabled&gt;true&lt;/enabled&gt;
  &lt;/classAccesses&gt;
  </code></pre>
  
  <p>My current struct: I parse out each of the header elements first and then create a new struct with the child elemtnts</p>
  
  <pre><code>type classAccesses struct {
      ApexClass string `xml:"apexClass"`
      Enabled   string `xml:"enabled"`
  }
  
  type diffs struct {
      ClassAccesses []classAccesses `xml:"classAccesses"`
  }
  </code></pre>
  
  <p>Desired map: I want to keep the diffs struct, but I want the child struct "ClassAccesses" to become similar to the below map.</p>
  
  <pre><code>map[string]string {
      "ApexClass": "enabled"
  }
  </code></pre>