metaleap / go-xsd

[stable since 2013] a lib for loading XML Schema Definition (XSD) files ➜ plus, a tool `makepkg` to code-generate from any *.xsd your Go package with all needed `struct`s to readily `xml.Unmarshal()` documents into, based on the XSD's schema definitions. NOT REALLY MAINTAINED FOR YEARS NOW: try the forks if running into issues.
http://www.reddit.com/r/golang/comments/12g6sl/is_there_a_tool_that_generates_go_source_code_for/
MIT License
216 stars 66 forks source link

has the Identifier schema changed in go 1.1? #2

Closed kristofer closed 7 years ago

kristofer commented 11 years ago

when I run this command:

./xsd-makepkg -uri="http://graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd"

I'm getting

2013/07/29 09:35:43 GOFMT: /Code/go-projects/src/github.com/metaleap/go-xsd-pkg/graphical.weather.gov/xml/DWMLgen/schema/DWML.xsd_go/DWML.xsd.go:122:30: expected type, found '-'

(among many such errors)

it appears that inside the identifier, a - is no longer okay?

type XsdGoPkgHasElem_creation-dateallproductTypeschema_CreationDate_TcreationDateType_ struct {
    CreationDate *TcreationDateType `xml:"creation-date"`

}

seems that the - in "...creation-date..." above is a compiler error.

matiwinnetou commented 10 years ago

I have similar problems with command:

xsd-makepkg -uri="http://services.mobile.de/schema/seller-1.0.xsd"

Please advise.

I am using Go 1.2