0
私は配列に入れたいPHPのxml文字列を持っています。 ttt:treeとttt:simple xmlを使って車を取得するにはどうすればよいですか?シンプルなXML名前空間のないノードを読み取る方法は?
<?xmlversion="1.0"encoding="utf-8"?>
<soap:Envelope xmlns:soap="htp://schemas.xmlsoap.org/soap/envelope/"xmlns:xsi="htp://www.w3.org/2001/XMLSchema-instance"xmlns:xsd="htp://www.w3.org/2001/XMLSchema">
<soap:Body>
<a xmlns="www.ttt.com">
<b xmlns:ttt="www.ttt.com">
<ttt:tree>big</ttt:tree>
<ttt:car>small</ttt:car>
</b>
</a>
</soap:Body>
</soap:Envelope>
あなたはそれを試してみましたか?あなたのエラーはどこですか? – cweiske
前回(PHP 5.2.6のどこかで)チェックしましたが、SimpleXMLはXMLの名前空間をサポートしていませんでした。答えは 'あなたはありません'です。代わりにXMLReaderクラスを使用してください。 – Mchl
@Mchl:何? SimpleXMLは、その誕生以来、(名前の基本を)扱うことができます。 – Wrikken