title: Parsing XML with CDATA using Go
body: <p>I am new in Golang and I've been trying to parse an xml in Go by defining structs and using xml.Unmarshal.There's no error thrown but the struct is empty.
  this is my xml:</p>
  
  <pre><code>var bodyXML = []byte('&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  &lt;smsBatchResponse&gt;
   &lt;ok&gt;
    &lt;![CDATA[CHECK_OK]]&gt;
   &lt;/ok&gt;
  &lt;/smsBatchResponse&gt;')
  </code></pre>
  
  <p>and this is my code:</p>
  
  <pre><code>type SmsBatchResponse struct {
      Ok string `xml:"ok"`
  }
  
  var result SmsBatchResponse
  
  xml.Unmarshal(bodyXML,result)
  fmt.Println(result)
  </code></pre>