On Thu, 26 Feb 2015 00:39:51 -0800 (PST)
krolaw <
kro...@gmail.com> wrote:
> Hi,
>
> I didn't have any luck finding a Go XML Schema validation solution,
> so I thought I would try my hand with CGO and write a libxml2 wrapper
> myself. Whilst I can validate, I can't extract the error messages on
> failure. I was wondering if someone who is familiar with CGO would
> have a look at my coding attempts and offer some guidance (and any
> other feedback deemed appropriate).
>
> The project is at:
>
https://github.com/krolaw/xsd
Sorry, have no time to look at your code, but did you look at already
available libxml2 bindings [1, 2]? They might have implemented this
aspect already.
By the way, goxml looks particularly comprehensive. May be it worth
getting in touch with the authors of these packages and discuss
contributing your code into one/both of them? I mean, too much
fragmentation is not very good, and IMO it would be better to have a
single package exposing most of libxml2 than three packages each
exposing just some bits of it.
P.S.
I've found these packages by searching on [3].
1.
https://github.com/martende/goxml
2.
https://github.com/teejae/go-libxml
3.
http://godoc.org