2019独角兽企业重金招聘Python工程师标准>>> 
<TCPFORWORD>
<TARGET IP="192.168.1.98" PORT="9527" />
<TARGET IP="192.168.1.97" PORT="9527" />
</TCPFORWORD>
type ServerConfig struct {
SERVERPORT int
TCPFORWORD tcpForword
}
type tcpForword struct {
XMLName xml.Name `xml:"TCPFORWORD"`
TARGETS []tcpTarget `xml:"TARGET"`
}
type tcpTarget struct {
XMLName xml.Name `xml:"TARGET"`
IP string `xml:"IP,attr"`
PORT string `xml:"PORT,attr"`
}
转载于:https://my.oschina.net/u/1431106/blog/192854
最后
以上就是繁荣小松鼠最近收集整理的关于golangXML中对象数组处理的全部内容,更多相关golangXML中对象数组处理内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复