用php读取xml soap,该怎么处理

2025-05-13 11:47:38
推荐回答(2个)
回答(1):

把它当xml 用simplexml解析
$soap=<<




Order_flag=0&Name_num=2077&StartCity=SZX&EndCity=PEK&Dates=2012-5-31&.......后面还有好多这样的数据。




SOAP;
$xml=simplexml_load_string($soap);
$result = $xml->children('')
->children('')
->QueryResponse
->QueryResult;
echo $result;

回答(2):

把它当xml 用simplexml解析
$soap=<<




Order_flag=0&Name_num=2077&StartCity=SZX&EndCity=PEK&Dates=2012-5-31&.......后面还有好多这样的数据。




SOAP;
$xml=simplexml_load_string($soap);
$result = $xml->children('')
->children('')
->QueryResponse
->QueryResult;
echo $result;
这样也许可以帮你解决,还有不懂得你可以去后盾人看视频