我是靠谱客的博主 繁荣小松鼠,这篇文章主要介绍golangXML中对象数组处理,现在分享给大家,希望可以做个参考。

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

<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中对象数组处理内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(132)

评论列表共有 0 条评论

立即
投稿
返回
顶部