If you want the field to contain the contents of the current element, you can use the xml:",chardata" . The way you marked your structure is looking for the <grammeme> subelement <grammeme> .
Thus, one set of structures that you could decipher:
type Dictionary struct { XMLName xml.Name `xml:"dictionary"` Grammemes []Grammeme `xml:"grammemes>grammeme"` } type Grammeme struct { Name string `xml:",chardata"` Parent string `xml:"parent,attr"` }
You can check this example here: http://play.golang.org/p/7lQnQOCh0I
James hestridge
source share