为了账号安全,请及时绑定邮箱和手机立即绑定

php解析xml问题

php解析xml问题

PHP
慕莱坞森 2018-07-31 14:15:05
这种xml怎么解析,java接口返回的数据。解析时候报错:simplexml_load_string(): namespace error : Namespace prefix client on RETCODE is not defined原因是:env:Envelope这种节点,找不到env这个命名空间
查看完整描述

1 回答

?
回首忆惘然

TA贡献1847条经验 获得超11个赞

参考 Parsing SOAP responses with PHP's SimpleXML

SOAP responses contain namespaces on some if not all of the nodes and SimpleXML doesn’t really care for that when using the traditional method of interaction. To accomplish this, you will need to use the SimpleXMLElement::children() method to specify the namespace


查看完整回答
反对 回复 2018-08-24
  • 1 回答
  • 0 关注
  • 691 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号