simplexml_load_string unable to retrieve values

elen10

New Member
I am trying to get the value in ResponseId and MAP_IMAGE_ZOOM1000 but i receive empty responses from var_dump. \[code\]<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org /soap/envelope/"><soapenv:Header xmlns:get="http://tnb.com.my/CGIS/D/getcustareasnapshotpro" xmlns:bsm="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:cgis="http://tnb.com.my/CGIS/D/cgis_cmccustomermgnt"/><soapenv:Body xmlns:get="http://tnb.com.my/CGIS/D/getcustareasnapshotpro" xmlns:bsm="http://www.tnb.com.my/CGIS/schemas/bsmfpro" xmlns:cgis="http://tnb.com.my/CGIS/D/cgis_cmccustomermgnt"><get1:GetCustAreaSnapshotResponseParam xmlns:get1="http://tnb.com.my/CGIS/D/getcustareasnapshotcon"> <ResponseHdr> <bsm:ResponseId>gero etgero etgero etgero etgero</bsm:ResponseId> <bsm:ResTransactionId>123456789012345</bsm:ResTransactionId> <bsm:ProviderId>CGIS</bsm:ProviderId> <bsm:ResTimestamp>2004-02-15T02:44:14</bsm:ResTimestamp> <bsm:ResStatus>SUCC</bsm:ResStatus> <bsm:MsgCode>IM-001</bsm:MsgCode> <bsm:MsgDesc>Success</bsm:MsgDesc> </ResponseHdr> <ResGetCustAreaSnapshot> <cmc:GetCustAreaSnapshot xmlns:cmc="http://tnb.com.my/CGIS/D/cmc_customermgnt"> <cmc:MAP_IMAGE_ZOOM1000>abc</cmc:MAP_IMAGE_ZOOM1000> </cmc:GetCustAreaSnapshot> </ResGetCustAreaSnapshot> </get1:GetCustAreaSnapshotResponseParam>\[/code\]\[code\]$Envelope = simplexml_load_string($responseXml);$Envelope->registerXPathNamespace('soap','http://schemas.xmlsoap.org/soap/envelope/');$Envelope->registerXPathNamespace('bsm','http://www.tnb.com.my/CGIS/schemas/bsmfpro/');$Envelope->registerXPathNamespace('cmc','http://tnb.com.my/CGIS/D/cgis_cmccustomermgnt/');$Envelope->registerXPathNamespace('get','http://tnb.com.my/CGIS/D/getcustareasnapshotcon/');$result = $Envelope->xpath('soap:Envelope/soap:Body/get:GetCustAreaSnapshotResponseParam/ResponseHdr/bsm:ResponseId');var_dump($result);die;\[/code\]any help would be much appreciated. Thank You !!
 
Back
Top