I have an xml that looks like this:
<MyElement>
<Ids>
<int>1</int>
<int>2</int>
</Ids>
</MyElement>
I find it challenging to parse in go. I've tried the following
type MyElement struct {
Ids int[]
}
or even
type Ids struct {
id int[] `xml:"int"`
}
type MyElement struct {
Ids Ids
}
But it never get picked up.
The difficulty is in the fact that the elements are all called int and only store an int value, instead of the usual key/value pair.