From: Uwe Steinmann Date: Tue, 22 Feb 2000 17:03:36 +0000 (+0000) Subject: - some tiny changes to the test routine X-Git-Tag: PHP-4.0-RC1~490 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9133a9b8b0f8740e47447579fd460025640a64da;p=php - some tiny changes to the test routine --- diff --git a/tests/testdom b/tests/testdom index 4593fe05da..bfd4ae3998 100644 --- a/tests/testdom +++ b/tests/testdom @@ -22,6 +22,14 @@ function output_node($node, $level=0) { for($i=0; $i<$level; $i++) echo " "; echo $node->content; + break; + case XML_ENTITY_REF_NODE: + echo $node->content; + break; + case XML_COMMENT_NODE: + for($i=0; $i<$level; $i++) + echo " "; + echo ""; echo "\n"; break; } @@ -35,10 +43,14 @@ function list_attr($node) { } $xmlstr = " - + +]> Title - +&sp; + + a1b1c1 @@ -66,6 +78,11 @@ $dom = xmltree($xmlstr); var_dump($dom); echo $dom->root->name; echo "\n"; +/* xmltree() creates a tree which is readonly. This means that a + function like + $dom->root->new_child("TEST", "ljdf"); + won't work +*/ /* The following builds a xml document from scratch */ echo "Test 3: building a xml document from scratch\n";