From a8951066061e5672feb07742049932bba970dd61 Mon Sep 17 00:00:00 2001 From: Sterling Hughes Date: Fri, 16 Jan 2004 22:26:09 +0000 Subject: [PATCH] update the profile of how namespaces should work after discussions with shane and rob richards. there were a lot of race conditions with regards to the way namespaces have been handled in XML documents so far, this new method removes the race conditions, and gives me a real reason to add the children() and attributes() methods. --- ext/simplexml/tests/profile04.phpt | 2 +- ext/simplexml/tests/profile05.phpt | 4 ++-- ext/simplexml/tests/profile06.phpt | 2 +- ext/simplexml/tests/profile07.phpt | 4 ++-- ext/simplexml/tests/profile10.phpt | 4 ++-- ext/simplexml/tests/profile11.phpt | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ext/simplexml/tests/profile04.phpt b/ext/simplexml/tests/profile04.phpt index bc15968eaa..7b7245de4f 100644 --- a/ext/simplexml/tests/profile04.phpt +++ b/ext/simplexml/tests/profile04.phpt @@ -10,7 +10,7 @@ $root = simplexml_load_string(' '); -echo $root->reserved->child; +echo $root->children('reserved')->child; echo "\n---Done---\n"; ?> --EXPECT-- diff --git a/ext/simplexml/tests/profile05.phpt b/ext/simplexml/tests/profile05.phpt index d4f651b57e..217ac67052 100644 --- a/ext/simplexml/tests/profile05.phpt +++ b/ext/simplexml/tests/profile05.phpt @@ -13,8 +13,8 @@ $root = simplexml_load_string(' $root->register_ns('myns', 'reserved-ns'); -echo $root->myns->child; -echo $root->reserved->child; +echo $root->children('myns')->child; +echo $root->children('reserved')->child; echo "\n---Done---\n"; ?> --EXPECT-- diff --git a/ext/simplexml/tests/profile06.phpt b/ext/simplexml/tests/profile06.phpt index e1817f30a9..4e9421a2a3 100644 --- a/ext/simplexml/tests/profile06.phpt +++ b/ext/simplexml/tests/profile06.phpt @@ -11,7 +11,7 @@ $root = simplexml_load_string(' '); -echo $root->child['reserved:attribute']; +echo $root->child->attributes('reserved')['attribute']; echo "\n---Done---\n"; ?> --EXPECT-- diff --git a/ext/simplexml/tests/profile07.phpt b/ext/simplexml/tests/profile07.phpt index b76e6ddc95..51ffb8efb3 100644 --- a/ext/simplexml/tests/profile07.phpt +++ b/ext/simplexml/tests/profile07.phpt @@ -13,8 +13,8 @@ $root = simplexml_load_string(' $root->register_ns('myns', 'reserved-ns'); -echo $root->child['reserved:attribute']; -echo $root->child['myns:attribute']; +echo $root->child->attributes('reserved')['attribute']; +echo $root->child->attributes('myns')['attribute']; echo "\n---Done---\n"; ?> --EXPECT-- diff --git a/ext/simplexml/tests/profile10.phpt b/ext/simplexml/tests/profile10.phpt index 747b056fcb..06beee851e 100644 --- a/ext/simplexml/tests/profile10.phpt +++ b/ext/simplexml/tests/profile10.phpt @@ -11,9 +11,9 @@ $root = simplexml_load_string(' '); -echo $root->child['reserved:attribute']; +echo $root->child->attributes('reserved')['attribute']; echo "\n"; -echo $root->child['special:attribute']; +echo $root->child->attributes('special')['attribute']; foreach ($root->child['attribute'] as $attr) { echo "$attr\n"; } diff --git a/ext/simplexml/tests/profile11.phpt b/ext/simplexml/tests/profile11.phpt index f9dd2dc58e..c5d764f1b2 100644 --- a/ext/simplexml/tests/profile11.phpt +++ b/ext/simplexml/tests/profile11.phpt @@ -12,9 +12,9 @@ $root = simplexml_load_string(' '); -echo $root->reserved->child; +echo $root->children('reserved')->child; echo "\n"; -echo $root->special->child; +echo $root->children('special')->child; foreach ($root->child as $child) { echo "$child\n"; } -- 2.50.1