을 구문 분석하는 방법 i를 follwing을 문자열을 가지고 내가 SOAP의 Respose
$xmlstring='<soap-env:envelope xmlns:ns1="http://back.com/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">
<soap-env:header></soap-env:header>
<soap-env:body>
<ns1:createuserresponse>
<username>qqq_d481</username>
<password>sdfdssdfds</password>
<result>
<succeeded>true</succeeded>
<errorcode>0</errorcode>
<errortext></errortext>
</result>
</ns1:createuserresponse>
</soap-env:body>
</soap-env:envelope>';
어느 한 날을 제안 할 수 있습니다 ...이 문자열에서 사용자 이름과 암호를 분석 할 .. 문자열 위 는 SOAP 응답
입니다
하지만 난 Adavance에
$xmlstring='<soap-env:envelope>
<soap-env:header></soap-env:header>
<soap-env:body>
<ns1:createuserresponse>
<username>qqq_d481</username>
<password>sdfdssdfds</password>
<result>
<succeeded>true</succeeded>
<errorcode>0</errorcode>
<errortext></errortext>
</result>
</ns1:createuserresponse>
</soap-env:body></soap-env:envelope>';
echo $xmltoparse= $xmlstring;
$xml = simplexml_load_string($xmltoparse);
print_r($xml);
then it works fine
감사를 사용하는 경우
을 확인? 당신의 예제에서''my xml string ''을 파싱하기 때문에 – Anas