droyo / go-xml

utility and code-generation libraries for XML
MIT License
304 stars 115 forks source link

Is this go-xml support xsd:extension? #94

Open krpmurugan opened 4 years ago

krpmurugan commented 4 years ago

Is it support xsd:extension element. If yes let us know how to use this. I've tried the cfg.GenSource(doc) xsdgen function seems not working.

droyo commented 4 years ago

I'm not sure I understand. The xsd package does support the extension element. Types defined as extensions of simpleContent or complexContent are understood by this package, and xsdgen can generate Go types from them.

If you have a schema, you can run the command in cmd/xsdgen/xsdgen.go against it to generate a Go package. The source of that command is also a suitable example if you are trying to use the cfg.GenSource function.