PHP解析.Net的webservice返回的dataset,该怎么解决

WBOY
Release: 2016-06-13 09:58:54
Original
901 people have browsed it

PHP解析.Net的webservice返回的dataset
我写了一个.net的webservice应用,PHP通过soapclient调用webservice的方法,返回一个dataset类型的数据,得到的是一个标准的XML文档,但是用PHP打印得到的结果,
   
-
-
-
-
-
-
-
-
   
   
 

 

 

 

 

 

 

-
-
-
  1 
  yang 
 

 

 

 

这个是查看到的XML文档,但是用PHP调用后打印出来
stdClass Object ( [dsResult] => stdClass Object ( [schema] => [any] => 1yang ) )
是这样一个类类型。
我想要得到的是a_di=1 aname=yang 这样格式的结果集,就像PHP直接查询数据库返回的结果集一样。
或者别的格式的也可以,但是能让我解析出来。
我在网上查了好多,都说dataset就是XML格式,但是我PHP这方面不很懂。不知道怎么做。

------解决方案--------------------
stdClass Object ( [dsResult] => stdClass Object ( [schema] => [any] => 1yang ) )
================================
你打印出这样的东西,说明调用没问题。
你看下页面原代码,result->dsResult->any应该是个xml串。
你可以使用simplexml_load_string解析那个串,看看手册就行了。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!