如何在soap请求后隔离xml标记的内容

I just created a soap request using curl and I'm trying to isolate the content of an xml tag in order to use it in another soap request.

Here is my code :

$xml_data = '<soapenv:Envelope xmlns:ns1="qsfd" xmlns:ns2="qsdf" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">

  <ns2:GetStock>

     <ns2:request>

        <ns1:StockRequests>

           <ns1:StockRequest>

              <ns1:CustomerNo>qsf</ns1:CustomerNo>

              <ns1:Division>qsdf</ns1:Division>

              <ns1:Item>qsdf</ns1:Item>

           </ns1:StockRequest>

        </ns1:StockRequests>

     </ns2:request>

  </ns2:GetStock>

$URL = "qsdf";
$ch = curl_init($URL);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml', 'SOAPAction:qsdf'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$xml_data");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$output = curl_exec($ch);
curl_close($ch);
echo htmlentities($output);
die();