All Projects → xuri → xgen

xuri / xgen

Licence: BSD-3-Clause License
XSD (XML Schema Definition) parser and Go/C/Java/Rust/TypeScript code generator

Programming Languages

go
31211 projects - #10 most used programming language
java
68154 projects - #9 most used programming language
rust
11053 projects

Projects that are alternatives of or similar to xgen

SAF-T-AO
Official XSD from the Government of Angola for use in SAF-T AO
Stars: ✭ 42 (-72.55%)
Mutual labels:  xml, xsd, xsd-schema
Xml2lua
XML Parser written entirely in Lua that works for Lua 5.1+. Convert XML to and from Lua Tables 🌖💱
Stars: ✭ 150 (-1.96%)
Mutual labels:  xml, xml-parser
xsdata
Naive XML & JSON Bindings for python
Stars: ✭ 144 (-5.88%)
Mutual labels:  code-generator, xsd
xrechnung-visualization
XSL transformators for web and pdf rendering of German CIUS XRechnung or EN16931-1:2017 [MIRROR OF GitLab]
Stars: ✭ 26 (-83.01%)
Mutual labels:  xml, xsd
Dart Xml
Lightweight library for parsing, traversing, and transforming XML in Dart.
Stars: ✭ 139 (-9.15%)
Mutual labels:  xml, xml-parser
Xmlbuilder2
An XML builder for node.js
Stars: ✭ 143 (-6.54%)
Mutual labels:  xml, xml-parser
Saxy
A fast, easy-to-use and XML 1.0 compliant XML SAX parser in Elixir
Stars: ✭ 192 (+25.49%)
Mutual labels:  xml, xml-parser
Xslt Processor
A JavaScript XSLT processor without native library dependencies
Stars: ✭ 50 (-67.32%)
Mutual labels:  xml, xml-parser
Pugixml
Light-weight, simple and fast XML parser for C++ with XPath support
Stars: ✭ 2,809 (+1735.95%)
Mutual labels:  xml, xml-parser
Posthtml
PostHTML is a tool to transform HTML/XML with JS plugins
Stars: ✭ 2,737 (+1688.89%)
Mutual labels:  xml, xml-parser
Autocser
AutoCSer is a high-performance RPC framework. AutoCSer 是一个以高效率为目标向导的整体开发框架。主要包括 TCP 接口服务框架、TCP 函数服务框架、远程表达式链组件、前后端一体 WEB 视图框架、ORM 内存索引缓存框架、日志流内存数据库缓存组件、消息队列组件、二进制 / JSON / XML 数据序列化 等一系列无缝集成的高性能组件。
Stars: ✭ 140 (-8.5%)
Mutual labels:  code-generator, xml
Sax Wasm
The first streamable, fixed memory XML, HTML, and JSX parser for WebAssembly.
Stars: ✭ 89 (-41.83%)
Mutual labels:  xml, xml-parser
Android Gpx Parser
A library to parse XML Gpx files, built for Android.
Stars: ✭ 79 (-48.37%)
Mutual labels:  xml, xml-parser
Woodstox
The gold standard Stax XML API implementation. Now at Github.
Stars: ✭ 145 (-5.23%)
Mutual labels:  xml, xml-parser
Oga
Read-only mirror of https://gitlab.com/yorickpeterse/oga
Stars: ✭ 1,147 (+649.67%)
Mutual labels:  xml, xml-parser
Parse Xml
A fast, safe, compliant XML parser for Node.js and browsers.
Stars: ✭ 184 (+20.26%)
Mutual labels:  xml, xml-parser
openimmo
OpenImmo library
Stars: ✭ 36 (-76.47%)
Mutual labels:  code-generator, xsd
Cheatyxml
CheatyXML is a Swift framework designed to manage XML easily
Stars: ✭ 23 (-84.97%)
Mutual labels:  xml, xml-parser
Xml Js
Converter utility between XML text and Javascript object / JSON text.
Stars: ✭ 874 (+471.24%)
Mutual labels:  xml, xml-parser
Xmlquery
xmlquery is Golang XPath package for XML query.
Stars: ✭ 209 (+36.6%)
Mutual labels:  xml, xml-parser

xgen logo


Build Status Code Coverage Go Report Card go.dev Licenses Donate

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.10 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.

go get -u -v github.com/xuri/xgen/cmd/...

The command below will walk on the xsd path and generate Go language struct code under the output directory.

$ xgen -i /path/to/your/xsd -o /path/to/your/output -l Go

Usage:

$ xgen [<flag> ...] <XSD file or directory> ...
   -i <path> Input file path or directory for the XML schema definition
   -o <path> Output file path or directory for the generated code
   -p        Specify the package name
   -l        Specify the language of generated code (Go/C/Java/Rust/TypeScript)
   -h        Output this help and exit
   -v        Output version and exit

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 piece of item content in a document. They can check if it adheres to the description of the element it is placed in.

XSD can be used to express a set of rules to which an XML document must conform in order to be considered "valid" according to that schema. However, unlike most other schema languages, XSD was also designed with the intent that determination of a document's validity would produce a collection of information adhering to specific data types. Such a post-validation infoset can be useful in the development of XML document processing software.

Contributing

Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change. XSD is compliant with XML Schema Part 1: Structures Second Edition.

Licenses

This program is under the terms of the BSD 3-Clause License. See https://opensource.org/licenses/BSD-3-Clause.

Logo is designed by xuri. Licensed under the Creative Commons 3.0 Attributions license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].