csimplestring / xsd-2-go

Given a XSD (XML Schema Definition) file, generating corresponding Golang XML structs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xsd-2-go

Given a XSD (XML Schema Definition) file, generating corresponding Golang XML structs. This tool is written in Java.

  1. Requirements

    • Java 1.6 or above.
    • XJC (Jaxb Binding Compiler)
  2. Usage

Using this tool is pretty easy: download jar folder, then go to jar folder. In that folder, there are a jar file and run.sh script. You just need to give the path of xsd file:

cd script
./run.sh XSD_file_path 

For example, it will output some Golang structs with XML tags.

type XMLVendor struct {
	XMLName xml.Name 	`xml:"vendor"`
	Value	[]string	`xml:"value"`
}

type XMLVersion struct {
	XMLName xml.Name 	`xml:"version"`
	Id	string			`xml:"id,attr"`
	Value	bool		`xml:"value,attr"`
}

About

Given a XSD (XML Schema Definition) file, generating corresponding Golang XML structs.

License:GNU General Public License v2.0


Languages

Language:Java 99.1%Language:Shell 0.9%