{"repo":"miku/zek","free":true,"listed":false,"github":"https://github.com/miku/zek","clone":"git clone https://github.com/miku/zek.git","description":"Generate a Go struct from XML.","language":"Go","stars":820,"topics":["xml","code-generation","hacktoberfest"],"license":"GPL-3.0","category":"dev-tools","readme_excerpt":"zek Zek is a prototype for creating a Go struct from an XML document. The resulting struct works best for reading XML (see also 14), to create XML, you might want to use something else. It was developed at Leipzig University Library to shorten the time to go from raw XML to a struct that allows to access XML data in Go programs. Skip the fluff, just the code. Given some XML, run: Online try online via WASM: https://xml-to-go.github.io/, thanks YaroslavPodorvanov! try it online at https://blog.kowalczyk.info/tools/xmltogo/ -- thanks, kjk! About Upsides: it works fine for non-recursive structures, does not need XSD or DTD, it is relatively convenient to access attributes, children and text, will generate a single struct, which make for a quite compact representation, simple user interface, comments with examples, schema inference across multiple files. Downsides: experimental, early, buggy, unstable prototype, no support for recursive types (similar to Russian Doll strategy, [1]) no type inference, everything is accessible as string (without a schema, type inference may fail if the type guess is wrong) Bugs: Mapping between XML elements and data structures is inherently flawed: an XML element is an order-dependent collection of anonymous values, while a data structure is an order-independent collection of named values. https://golang.org/pkg/encoding/xml/#pkg-note-BUG Related projects: https://github.com/bemasher/JSONGen https://github.com/dutchcoders/XMLGen https://github.com/","default_branch":null,"files":null,"tree":[],"storefront":"/r/miku","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/miku/zek/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."}