语句不能实现
func main() {
file, err := os.Open(xmlFile)
if err != nil {
panic(err)
}
data, err := ioutil.ReadFile(file)
if err != nil {
panic(err)
}
defer file.Close()
NodeDecoder := xml.NewDecoder(bytes.NewBuffer(data))
var t xml.Token
for t,err = NodeDecoder.Token(); err = =nil; t,err = NodeDecoder.Token(){
switch token := t.(type){
case xml.StartElement:
name:= token.Name.Local
fmt.Println(name)
case xml.EndElement:
}
}