For example, if the xml is simple:
<p>this is a test xml</p>
Then I can use struct like this:
type Dummy struct {
XMLName xml.Name `xml:"p"`
Value string `xml:",chardata"`
}
But if the xml has special character, like
<p>this is a test < xml & </p>
I used the same struct and it caused error, and it seems nothing to do with struct, because I use interface{} and it caused error the same.
I read the document of package "encoding/xml" but cannot find the right way.
Does anyone know how to do this?