Hi,
I have to parse XML like this:
<entry>
<vars>
<var key="foo">bar</var>
<var key="foo2"><var key="hello">world</var></var>
</vars>
</entry>
into this
{
"foo": "bar",
"foo2": {"hello": "world"}
}
Any ideas how to do this? I am thinking about using
http://golang.org/pkg/encoding/xml/#Decoder.Token to parse this into map[string]interface{} .
Also what is the simplest way to get XML between <vars></vars>? I try this:
http://play.golang.org/p/NKsPStD2Om , but it fails.