Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于CDATA的问题 #4

Open
bran-nie opened this issue Jul 19, 2019 · 1 comment
Open

关于CDATA的问题 #4

bran-nie opened this issue Jul 19, 2019 · 1 comment

Comments

@bran-nie
Copy link

bran-nie commented Jul 19, 2019

首先很高兴阅读你的文章,这让新手的我至少能走出第一步。
但不知道是版本问题还是怎么,目前教程中的关于response的xml加入CDATA,你文中用的方式已经不可以了。并且还有一个bug会影响消息的返回。(因为除了CreateTime之外的字段都是空了。)

type CDATAText struct {
	Value string `xml:",innerxml"`
}
// 应该替换为cdata。
type CDATAText struct {
	Value string `xml:",cdata"`
}

// bug,没有return值
func value2CDATA(v string) CDATAText {
	return CDATAText{}
}

// fix 后
func value2CDATA(v string) CDATAText {
	return CDATAText{v}
}
@bigwhite
Copy link
Owner

时间相隔太久了,这是哪篇文章中的问题,请告诉我文章地址,谢谢。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants