My XML data:
<dictionary version="0.8" revision="403605">
<grammemes>
<grammeme parent="">POST</grammeme>
<grammeme parent="POST">NOUN</grammeme>
</grammemes>
</dictionary>
My code:
type Dictionary struct {
XMLName xml.Name `xml:"dictionary"`
Grammemes *Grammemes `xml:"grammemes"`
}
type Grammemes struct {
Grammemes []*Grammeme `xml:"grammeme"`
}
type Grammeme struct {
Name string `xml:"grammeme"`
Parent string `xml:"parent,attr"`
}
I get Grammeme.Parent attribute, but i don't get Grammeme.Name. Why?