从xml标记中提取值

我正在尝试从标签中提取RecordID =“ 1014276”


我尝试了:


$result = curl_exec($ch);

curl_close($ch);


$xml2 = simplexml_load_string($result);

echo $latitude = (string) $xml2['RecordID'];

这是XML响应:


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

   <soap:Body>

      <ns1:createDataResponse xmlns:ns1="http://3e.pl/ADInterface">

         <StandardResponse RecordID="1014276" xmlns="http://3e.pl/ADInterface"/>

      </ns1:createDataResponse>

   </soap:Body>

</soap:Envelope>


慕桂英3389331
浏览 131回答 2
2回答
打开App,查看更多内容
随时随地看视频慕课网APP