|
SimpleXMLElement::getDocNamespacesReturns namespaces declared in document Description
public array SimpleXMLElement::getDocNamespaces
([ bool
$recursive = false
[, bool $from_root = true
]] )Returns namespaces declared in document Parameters
Return ValuesThe getDocNamespaces method returns an array of namespace names with their associated URIs. Examples
Example #1 Get document namespaces
<?php The above example will output: array(1) { ["p"]=> string(21) "http://example.org/ns" }
Example #2 Working with multiple namespaces
<?php The above example will output: array(3) { ["p"]=> string(21) "http://example.org/ns" ["t"]=> string(23) "http://example.org/test" ["a"]=> string(23) "http://example.org/addr" } Changelog
See Also
|