xref: /PHP-7.4/ext/simplexml/tests/profile04.phpt (revision 782352c5)
1--TEST--
2SimpleXML [profile]: Accessing a namespaced element
3--SKIPIF--
4<?php if (!extension_loaded("simplexml")) print "skip"; ?>
5--FILE--
6<?php
7$root = simplexml_load_string('<?xml version="1.0"?>
8<root xmlns:reserved="reserved-ns">
9 <reserved:child>Hello</reserved:child>
10</root>
11');
12
13echo $root->children('reserved-ns')->child;
14echo "\n---Done---\n";
15?>
16--EXPECT--
17Hello
18---Done---
19