How does PHP resolve dataset returned by. Net webservice?
Source: Internet
Author: User
PHP parsing. net webservice returned dataset I wrote. net webservice application, PHP calls the webservice method through soapclient, returns a dataset type data, get a standard XML document, but print the result with PHP, & nb PHP parsing. dataset returned by the webservice of. Net
I wrote. net webservice application, PHP calls the webservice method through soapclient, returns a dataset type data, get a standard XML document, but print the result with PHP,
-
-
-
-
-
-
-
-
-
-
-
1
Yang
This is the XML document we can see, but it is printed after being called by PHP.
StdClass Object ([dsResult] => stdClass Object ([schema] => [any] => 1 yang ))
Is such a class type.
What I want to get is a result set in the format of a_di = 1 aname = yang, just like the result set returned by PHP directly querying the database.
Or other formats, but it can be parsed by me.
I checked a lot on the Internet and said that dataset is in XML format, but I am not familiar with PHP. I don't know how to do it.
------ Solution --------------------
StdClass Object ([dsResult] => stdClass Object ([schema] => [any] => 1 yang ))
======================================
If you print something like this, it means the call is okay.
You can see the original code on the page. result-> dsResult-> any should be an xml string.
You can use simplexml_load_string to parse the string and check the manual.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.