Help with xml to struct

Hi

I am using thick pakage for soap: https://github.com/tiaguinho/gosoap

OK, I need to transform this xml to struct: https://pastebin.com/gMGmWejJ

I was trying to do it like this but with no luck:

type PollResponse struct {
	XMLName xml.Name `xml:"return"`
	User    User     `xml:"user"`
}

type User struct {
	Value []Value `xml:"user"`
}

type Value struct {
	active bool `xml:"active"`
}

tnx
miha

I recently tried to distill the essential into this Q&A: https://stackoverflow.com/questions/53305826/how-to-unmarshal-simple-xml-with-multiple-items-in-go/53305827#53305827 . Maybe that helps.

I also notice your active field of the Value struct starts with a lower case letter.

hello

thank you.

brmiha

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.