--TEST--
Bug #41861 (getNamespaces() returns the namespaces of a node's siblings)
--SKIPIF--
--FILE--
');
$name = $xml->getName();
$namespaces = $xml->getNamespaces(True);
echo "root(recursive): '$name' -- namespaces: ", implode(', ', $namespaces), "\n";
$namespaces = $xml->getNamespaces(False);
echo "root(non-recursive): '$name' -- namespaces: ", implode(', ', $namespaces), "\n";
foreach (array(null, '#ns1', '#ns2', '#ns3') as $ns)
{
foreach ($xml->children($ns) as $child)
{
$name = $child->getName();
$namespaces = $child->getNamespaces(false);
echo "children($ns): '$name' -- namespaces: ", implode(', ', $namespaces), "\n";
}
}
?>
===DONE===
--EXPECT--
root(recursive): 'root' -- namespaces: #ns1, #ns2, #ns3
root(non-recursive): 'root' -- namespaces:
children(): 'first_node_no_ns' -- namespaces:
children(): 'last_node_no_ns' -- namespaces:
children(#ns1): 'node1' -- namespaces: #ns1
children(#ns2): 'node2' -- namespaces: #ns2
children(#ns3): 'node3' -- namespaces: #ns3
===DONE===