summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUwe Steinmann <steinm@php.net>2000-02-22 17:03:36 +0000
committerUwe Steinmann <steinm@php.net>2000-02-22 17:03:36 +0000
commit9133a9b8b0f8740e47447579fd460025640a64da (patch)
treeb33f04639b8e947d29fffa9698e5c7a9f965ab4b /tests
parent5f34cfddbca1b32c53d6e5e3bc68165652017a44 (diff)
downloadphp-git-9133a9b8b0f8740e47447579fd460025640a64da.tar.gz
- some tiny changes to the test routine
Diffstat (limited to 'tests')
-rw-r--r--tests/testdom21
1 files changed, 19 insertions, 2 deletions
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 "<!--".$node->content."-->";
echo "\n";
break;
}
@@ -35,10 +43,14 @@ function list_attr($node) {
}
$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 @@ $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";