I have the following struct:
type XMLProduct struct {
XMLName xml.Name `xml:\"row\"`
ProductId string `xml:\"product_id\"`
ProductN
If you use Go version 1.6 or later, just adding 'cdata' tag will work fine.
type XMLProduct struct {
XMLName xml.Name `xml:"row"`
ProductId string `xml:"product_id"`
ProductName string `xml:"product_name,cdata"`
OriginalPrice string `xml:"original_price"`
BargainPrice string `xml:"bargain_price"`
TotalReviewCount int `xml:"total_review_count"`
AverageScore float64 `xml:"average_score"`
}