{"repo":"xuri/xgen","free":true,"listed":false,"github":"https://github.com/xuri/xgen","clone":"git clone https://github.com/xuri/xgen.git","description":"XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator","language":"Go","stars":420,"topics":["xsd","xsd-schema","xml","xml-parser","xml-parsing","generator","code-generator","golang","go","ooxml"],"license":"BSD-3-Clause","category":"docs-static-sites","readme_excerpt":"xgen Introduction xgen is a library written in pure Go providing a set of functions that allow you to parse XSD (XML schema definition) files. This library needs Go version 1.25.0 or later. The full API docs can be seen using go's built-in documentation tool, or online at go.dev. xgen commands automatically compiles XML schema files into the multi-language type or class declarations code. Install the command line tool first, installing executables with go install The command below will walk on the xsd path and generate Go language struct code under the output directory. Usage: Programmatic Usage You can use xgen as a library in your Go code for more control over the parsing and code generation process. Basic Usage Customization with Hooks The Hook interface allows you to customize the parsing and code generation process by intercepting events at various stages: Use cases for hooks include: - Parsing custom XSD extensions or vendor-specific annotations - Customizing type mappings between XSD and target language types - Injecting additional methods or documentation into generated code - Filtering elements during parsing or code generation See the Hook interface documentation and TestParseGoWithAppinfoHook in parser test.go for complete examples. XSD (XML Schema Definition) XSD, a recommendation of the World Wide Web Consortium (W3C), specifies how to formally describe the elements in an Extensible Markup Language (XML) document. It can be used by programmers to verify each piec","default_branch":null,"files":null,"tree":[],"storefront":"/r/xuri","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/xuri/xgen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}