如何在golang中将xml文件转换为map [string] interface {}? [重复]

展开原文

原文

This question already has an answer here:

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>

xml
dongshiran7000
dongshiran7000 也问(并回答)在这里。
接近 5 年之前 回复
drux41001
drux41001 没有将XML转换为地图的通用方法。您想成为键和值是什么?
接近 5 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐