title: Golang XML attribute and value
body: <p>I can't seem to figure out why this isn't working</p>
  
  <pre><code> type HostProperties struct {                                                                                                                     
            XMLName xml.Name   `xml:HostProperties"`                                                                                                 
            Info    []InfoList `xml:"tag"`                                                                                                           
   }                                                                                                                                                
    type InfoList struct {                                                                                                                           
            HostEnd         string  `xml:",chardata"`                                                                                                
            PatchSummary    string  `xml:",chardata"`                                                                                                
            CPE1            string  `xml:",chardata"`                                                                                                
            CPE0            string  `xml:",chardata"`                                                                                                
            SystemType      string  `xml:",chardata"`                                                                                                
            OperatingSystem string  `xml:",chardata"`                                                                                                
            MacAddress      string  `xml:",chardata"`                                                                                                
            Traceroute      string  `xml:",chardata"`                                                                                                
            IP              string  `xml:",chardata"`                                                                                                
            FQDN            string  `xml:",chardata"`                                                                                                
            HostStart       string  `xml:",chardata"`                                                                                                
    }
  &lt;HostProperties&gt;
  &lt;tag name="HOST_END"&gt;Thu Feb 20 12:38:24 2014&lt;/tag&gt;
  &lt;tag name="patch-summary-total-cves"&gt;4&lt;/tag&gt;
  &lt;tag name="cpe-1"&gt;cpe:/a:openbsd:openssh:5.6 -&amp;gt; OpenBSD OpenSSH 5.6&lt;/tag&gt;
  &lt;tag name="cpe-0"&gt;cpe:/o:vmware:esx_server&lt;/tag&gt;
  &lt;tag name="system-type"&gt;hypervisor&lt;/tag&gt;
  &lt;tag name="operating-system"&gt;VMware ESXi&lt;/tag&gt;
  &lt;tag name="mac-address"&gt;00:00:00:00:00:00&lt;/tag&gt;
  &lt;tag name="traceroute-hop-0"&gt;172.28.28.29&lt;/tag&gt;
  &lt;tag name="host-ip"&gt;172.28.28.29&lt;/tag&gt;
  &lt;tag name="host-fqdn"&gt;foobar.com&lt;/tag&gt;
  &lt;tag name="HOST_START"&gt;Thu Feb 20 12:30:14 2014&lt;/tag&gt;
  &lt;/HostProperties&gt;
  </code></pre>
  
  <p><strong>Results</strong></p>
  
  <pre><code>{HostEnd:172.28.28.29 PatchSummary: CPE1: CPE0: SystemType: OperatingSystem: MacAddress: Traceroute: IP: FQDN: HostStart:}
  </code></pre>
  
  <p>It creates a bunch of new slices with only the first element filled in and even then it's the wrong element.  It's not filling out the other variables.  The rest of the file seems to parse fine, just can't figure out this part.</p>