如何用php解析下面的xml?

如何用php解析下面的xml?,php,web-services,web,Php,Web Services,Web,使用类。例如: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ns0:GetListBy_Qualificatio

使用类。例如:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns0:GetListBy_QualificationResponse xmlns:ns0="urn:WS_CTM_People_ICEVA">
         <ns0:getListValues>
            <ns0:Person_ID>PPL000000301739</ns0:Person_ID>
            <ns0:Submitter>soehler</ns0:Submitter>
            <ns0:Profile_Status>Enabled</ns0:Profile_Status>
            <ns0:Locale2>en_US</ns0:Locale2>
            <ns0:VIP>No</ns0:VIP>
            <ns0:Client_Sensitivity>Standard</ns0:Client_Sensitivity>
         </ns0:getListValues>
      </ns0:GetListBy_QualificationResponse>
   </soapenv:Body>
</soapenv:Envelope>

阅读类文档并从$xml变量中提取数据。

是否使用代码?你试过什么?如果您在google上搜索,几乎可以肯定PHP已经有了XML解析函数。其次,您在PHP代码方面做了哪些尝试?
include('simple_html_dom.php');

$xml = '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
   <soapenv:Body>
      <ns0:GetListBy_QualificationResponse xmlns:ns0="urn:WS_CTM_People_ICEVA">
         <ns0:getListValues>
            <ns0:Person_ID>PPL000000301739</ns0:Person_ID>
            <ns0:Submitter>soehler</ns0:Submitter>
            <ns0:Profile_Status>Enabled</ns0:Profile_Status>
            <ns0:Locale2>en_US</ns0:Locale2>
            <ns0:VIP>No</ns0:VIP>
            <ns0:Client_Sensitivity>Standard</ns0:Client_Sensitivity>
         </ns0:getListValues>
      </ns0:GetListBy_QualificationResponse>
   </soapenv:Body>
</soapenv:Envelope>';

$xml = str_get_html($xml);
print_r( $xml );