go-xml icon indicating copy to clipboard operation
go-xml copied to clipboard

Is this go-xml support xsd:extension?

Open krpmurugan opened this issue 6 years ago • 1 comments

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.

krpmurugan avatar Dec 05 '19 11:12 krpmurugan

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.

droyo avatar Mar 21 '20 01:03 droyo