cvs: /php4/tests testdom
| From: | Uwe Steinmann | Date: | Tue, 22 Feb 2000 17:03:36 +0000 |
| Subject: | cvs: /php4/tests testdom | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-10651@lists.php.net to get a copy of this message | ||
steinm Tue Feb 22 09:03:36 2000 EDT
Modified files:
/php4/tests testdom
Log:
- some tiny changes to the test routine
Index: php4/tests/testdom
diff -u php4/tests/testdom:1.10 php4/tests/testdom:1.11
--- php4/tests/testdom:1.10 Mon Feb 21 08:23:08 2000
+++ php4/tests/testdom Tue Feb 22 09:03:36 2000
@@ -22,6 +22,14 @@
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 "<!--".$node->content."-->";
echo "\n";
break;
}
@@ -35,10 +43,14 @@
}
$xmlstr = "<?xml version='1.0'?>
-<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'>
+<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
+[ <!ENTITY sp \"spanish\">
+]>
<chapter language='en'><title language='en'>Title</title>
<para language='ge'>
-<informaltable language='sp'>
+&sp;
+<!-- comment -->
+<informaltable language='&sp;kkk'>
<tgroup cols='3'>
<tbody>
<row><entry>a1</entry><entry
morerows='1'>b1</entry><entry>c1</entry></row>
@@ -66,6 +78,11 @@
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";