decoder.CharsetReader required
decoder := xml.NewDecoder(xmlFile)
decoder.CharsetReader = func(encoding string, input io.Reader) (io.Reader, error) {
return input, nil
}
if err := decoder.Decode(doc); err != nil {
return nil, err
}
unless the decoder.CharsetReader, it could not parse such xml file : https://apiwiki.fxcorporate.com/api/fix/docs/FIXFXCM10.xml