草庐IT

Unmarshaling

全部标签

xml - Go XML Unmarshaling 不读取属性

Go语言的新手。从XML中,代码解码除属性之外的所有值。有人可以告诉我做错了什么吗:packagemainimport("encoding/xml""fmt")funcmain(){v,_:=GetData()fmt.Print(v)}typeQuerystruct{InstituationList[]Instituation`xml:"institution"`}typeInstituationstruct{XMLNamexml.Name`xml:"institution"`OFXHomeIDstring`xml:"id,attr"`Namestring`xml:"name"`FId