go语言解析带命名空间的xml
要解析如下xml到go中的strut,请高手指教:
<?xml version='1.0' encoding='UTF-8'?>
<cas:svResponse xmlns:cas='http://www.yale.edu/tp/cas'>
<cas:authSuccess>
<cas:user>xinyuan</cas:user>
<cas:ppal><![CDATA[{"xxxxdxx":false,"dddddd":"ddd"}]]>
</cas:ppal>
</cas:autSuccess>
</cas:svResponse>
strut如下,解析失败:
type Result struct {
SvResponse SvResponse `xml:"svResponse"`
}
type SvResponsestruct {
AuthSuccess AuthSuccess `xml:"authSuccess"`
}
type AuthSuccess struct {
User string `xml:"user"`
Ppal string `xml:"ppal"`
}