2
SimpleXML [profile]: Accessing an aliased namespaced attribute
4
<?php if (!extension_loaded("simplexml")) print "skip"; ?>
7
error_reporting(E_ALL & ~E_NOTICE);
8
$root = simplexml_load_string('<?xml version="1.0"?>
9
<root xmlns:reserved="reserved-ns">
10
<child reserved:attribute="Sample" />
14
$rsattr = $root->child->attributes('reserved');
15
$myattr = $root->child->attributes('reserved-ns');
17
echo $rsattr['attribute'];
18
echo $myattr['attribute'];
19
echo "\n---Done---\n";