一个解析XML的有关问题,多谢
Jun 13, 2016 pm 01:30 PM
gt
lt
name
param
quot
请教大家一个解析XML的问题,谢谢
- XML code
<!-- Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> <alipay> <is_success>T</is_success> <request> <param name="partner">2088002007*** <param name="logistics_name">天天 <param name="create_transport_type">EMS <param name="trade_no">2008040902*** <param name="agent">20880020070*** <param name="notify_url"> http://10.2.5.100/api/apireceive/returnSuccess.php <param name="invoice_no">3455** <param name="service">send_goods_confirm_by_platform <param name="_input_charset">utf-8 <param name="transport_type">EMS <param name="return_url">http://10.2.5.100/api/returnResultList.php </request> <response> <tradebase> <buyer_account>2088002007301423***</buyer_account> <buyer_actions>[REFUND,CONFIRM_GOODS]</buyer_actions> <buyer_login_email>***</buyer_login_email> <buyer_type>PRIVATE_ACCOUNT</buyer_type> <buyer_user_id>2088002007****</buyer_user_id> <channel>interface/digi***</channel> <create_time>2008-04-09 16:10:25</create_time> <currency>156</currency> <gathering_type>1</gathering_type> <last_modified_time>2008-04-10 14:35:25</last_modified_time> <operator_role>B</operator_role> <out_trade_no>123455666***</out_trade_no> <partner_id>2088002007***6</partner_id> <seller_account>208800200730***156</seller_account> <seller_actions>[EXTEND_TIMEOUT]</seller_actions> <seller_login_email>song_xia**hoo.com.cn</seller_login_email> <seller_type>PRIVATE**OUNT</seller_type> <seller_user_id>208800**301410</seller_user_id> <service_fee>0.00</service_fee> <service_fee_ratio>0.0</service_fee_ratio> <stop_timeout>F</stop_timeout> <total_fee>2.00</total_fee> <trade_from>INST_P**ER</trade_from> <trade_no>2008040**81748</trade_no> <trade_status>WAIT_BUYER_CONFIRM_GOODS</trade_status> <trade_type>S</trade_type> </tradebase> </response> <sign>eb07c7407baf*****0804751a21c1e</sign> <sign_type>MD5</sign_type> </alipay>
登录后复制
我想获取alipay下的is_success节点的值 。
我是的代码是这样写的
$message=$doc->getElementsByTagName("alipay")->item(0)->nodeValue;
但是好像获取的值不对。 请教下大家如何获取这个值了。 谢谢
------解决方案--------------------
$message=$doc->getElementsByTagName("is_success")->item(0)->nodeValue;
本站声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn

热门文章
两个点博物馆:邦格荒地地点指南
4 周前
By 尊渡假赌尊渡假赌尊渡假赌
击败分裂小说需要多长时间?
3 周前
By DDD
仓库:如何复兴队友
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
公众号网页更新缓存难题:如何避免版本更新后旧缓存影响用户体验?
3 周前
By 王林

热门文章
两个点博物馆:邦格荒地地点指南
4 周前
By 尊渡假赌尊渡假赌尊渡假赌
击败分裂小说需要多长时间?
3 周前
By DDD
仓库:如何复兴队友
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
3 周前
By 尊渡假赌尊渡假赌尊渡假赌
公众号网页更新缓存难题:如何避免版本更新后旧缓存影响用户体验?
3 周前
By 王林

热门文章标签

记事本++7.3.1
好用且免费的代码编辑器

SublimeText3汉化版
中文版,非常好用

禅工作室 13.0.1
功能强大的PHP集成开发环境

Dreamweaver CS6
视觉化网页开发工具

SublimeText3 Mac版
神级代码编辑软件(SublimeText3)

Microsoft正在推出Windows 11 23H2版本到带有Copilot的发布预览频道
