0
シンプルかもしれませんが、私はこだわっています。 XML文字列をPHPオブジェクトに変換したい。私のXML文字列は次のとおりです。simplexml_load_stringは空の結果を返します
$a = '<?xml version="1.0" encoding="utf-8"?>
<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>
<VerifyTxnResponse xmlns="http://www.exmlplekhe.com/">
<VerifyTxnResult>BID <11467></VerifyTxnResult>
</VerifyTxnResponse>
</soap:Body>
</soap:Envelope>';
私はvar_dump(simplexml_load_string($a));
を試してみましたが、それは空のSimpleXMLElement
オブジェクトを返します。私はVerifyTxnResult
ノードを取得したいです。私は、<11467>
が問題を引き起こしていると思う。可能な解決策は何でしょうか?
ありがとうございました。
関数は 'SimpleXMLElement'オブジェクトを返します。 「空の結果」とはどういう意味ですか?あなたは何をしようとしていますか? –
正確に何が返されますか? –
@ruslan空のSimpleXMLElementオブジェクトを返します – vijayrana