go-xml

module
v0.0.0-...-03ebdbe Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2016 License: MIT

README

GoDoc

This repository contains a collection of Go packages for working with XML, with the ultimate goal of enabling code generation based on XML documents.

  • The xmltree package converts xml documents to a tree data structure, and provides convenient methods for manipulating and searching through that tree.
  • The xsd package implements a parser for XML Schema. It takes some liberties from the specification, and would need some work for use as a validator, but it handles type inheritance and XML namespaces in a relatively sane way.
  • The xsdgen package provides a customizable code generator that generates Go type declarations and marshal/unmarshal methods for an XML Schema.
  • The xsdgen command generates Go code with default settings and is suitable for use with go generate.

This code is still very rough around the edges, but I have succesfully used it to generate type declarations for some pretty complex XML schema from an Apache Axis application. There are github issues opened for missing functionality.

Directories

Path Synopsis
cmd
xsdgen
xsdgen is a tool to automatically generate Go type declarations and associated methods based on one or more XML Schema.
xsdgen is a tool to automatically generate Go type declarations and associated methods based on one or more XML Schema.
internal
gen
Package gen provides functions for generating go source code The gen package provides wrapper functions around the go/ast and go/token packages to reduce boilerplate.
Package gen provides functions for generating go source code The gen package provides wrapper functions around the go/ast and go/token packages to reduce boilerplate.
Package xmltree converts XML documents as a tree of Go structs.
Package xmltree converts XML documents as a tree of Go structs.
Package xsd parses type declarations in XML Schema documents.
Package xsd parses type declarations in XML Schema documents.
Package xsdgen generates Go source code from xml schema documents.
Package xsdgen generates Go source code from xml schema documents.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL