1--TEST-- 2SimpleXML [profile]: Accessing a namespaced attribute 3--EXTENSIONS-- 4simplexml 5--FILE-- 6<?php 7error_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" /> 11</root> 12'); 13 14$attr = $root->child->attributes('reserved-ns'); 15echo $attr['attribute']; 16echo "\n---Done---\n"; 17?> 18--EXPECT-- 19Sample 20---Done--- 21