不大懂HTTP 1.0/1.1协议标准,不过测试发现同样的HTTP XML接口输出,不同的HTTP请求,返回的结果不同
1.0原样字符输出
HTTP/1.1将获得格式后的数据。
已经格式化的字符串,此时无法直接进行xml.LoadXml(str),将提示根节点数据无效。
1.0原样字符输出
- # <?xml version="1.0" encoding="utf-8"?><Results ver="1.0"><CurrentPage>1</CurrentPage><Start>0</Start><Pagesize>12</Pagesize>......</RecordSet></Results>
HTTP/1.1将获得格式后的数据。
- <?xml version="1.0" encoding="GBK"?>
- <Results ver="1.0">
- <CurrentPage>1</CurrentPage>
- <Start>0</Start>
- <Pagesize>12</Pagesize>
- ..................
- </RecordSet>
- </Results>
已经格式化的字符串,此时无法直接进行xml.LoadXml(str),将提示根节点数据无效。