|
SimpleXMLElement::getDocNamespacesドキュメントで宣言されている名前空間を返す 説明
public arrayfalse SimpleXMLElement::getDocNamespaces(bool
$recursive = false , bool $fromRoot = true )ドキュメントで宣言されている名前空間を返します。 パラメータ
戻り値
例
例1 ドキュメントの名前空間の取得
<?php 上の例の出力は以下となります。 array(1) { ["p"]=> string(21) "http://example.org/ns" }
例2 複数の名前空間での動作
<?php 上の例の出力は以下となります。 array(3) { ["p"]=> string(21) "http://example.org/ns" ["t"]=> string(23) "http://example.org/test" ["a"]=> string(23) "http://example.org/addr" } 参考
|