我使用以下方法获取网络服务数据,
$client = new SoapClient("http://empblr.dyndns.org/CentralHomeDelivery_Mob/Service.asmx?wsdl");
$result = $client->GetAlladdress(array('customerid'=>36));
当我 var_dump $result 我得到,
object(stdClass)[16]
public 'GetAlladdressResult' =>
object(stdClass)[17]
public 'schema' => string '<xs:schema xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="NewDataSet"><xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true"><xs:complexType><xs:choice minOccurs="0" maxOccurs="unbounded"><xs:element name="Table"><xs:complexType><xs:sequence><xs:element name="AdressID" type="xs:int" minOccurs="0"/><xs:element name="CustomerID" type="xs:int" minOccurs="0"/><xs:element name="LocationID" type="xs:int" minOccurs="0"/><xs'... (length=1030)
public 'any' => string '<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet xmlns=""><Table diffgr:id="Table1" msdata:rowOrder="0"><AdressID>643</AdressID><CustomerID>36</CustomerID><LocationID>176</LocationID><StreetName>asdf</StreetName><HouseNo>1234</HouseNo><AlternatePhone>5632256</AlternatePhone><LandMark>asdf </LandMark><MainLocID>2</MainLocID><locName>ANDOLANA CIRCLE</locName><MainLoc>Mysore </MainLoc></Table><Table diffgr:id="Table2" m'... (length=1864)
如何从子节点获取值<CustomerID>
并存储到数组中?
谢谢..