This question already has an answer here:
- Unmarshal XML Into a Map 2 answers
- How to traverse through XML data in Golang? 4 answers
I know the method Unmarshal
in encoding/json
can convert a json to map[string]interface{}
, so I also want to do same thing with encoding/xml
, but it failed.
It seems encoding/xml
do not have the similar method, do any one know how to solve it? I don't want to define struct for the xml content, since the xml is generated by many different services.
Thanks in advance.
</div>