summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorUwe Steinmann <steinm@php.net>2000-03-01 21:16:24 +0000
committerUwe Steinmann <steinm@php.net>2000-03-01 21:16:24 +0000
commitd693d6b2cbb28496302efbfc3b58f7599d8c71ca (patch)
treee3693beeeb07508d20e423093cea9be6184b2d21 /tests
parent52eebff6f8a7c68f598902046ad9de8f894a2027 (diff)
downloadphp-git-d693d6b2cbb28496302efbfc3b58f7599d8c71ca.tar.gz
- started to implement overload class for xml node
Diffstat (limited to 'tests')
-rw-r--r--tests/testdom7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/testdom b/tests/testdom
index bfd4ae3998..53aa75c657 100644
--- a/tests/testdom
+++ b/tests/testdom
@@ -46,6 +46,7 @@ $xmlstr = "<?xml version='1.0'?>
<!DOCTYPE chapter SYSTEM '/share/sgml/Norman_Walsh/db3xml10/db3xml10.dtd'
[ <!ENTITY sp \"spanish\">
]>
+<!-- lsfj -->
<chapter language='en'><title language='en'>Title</title>
<para language='ge'>
&sp;
@@ -66,7 +67,10 @@ $xmlstr = "<?xml version='1.0'?>
by using the methods of the xmlnode object
*/
echo "Test 1: accessing single nodes from php\n";
-$dom = xmldoc($xmlstr);
+if(!$dom = xmldoc($xmlstr)) {
+ echo "Error while parsing the document\n";
+ exit;
+}
echo "XML Version: ".$dom->version."\n";
$dtd = $dom->dtd();
$rootnode = $dom->root();
@@ -75,6 +79,7 @@ output_node($rootnode);
/* This one creates a dom tree made of php objects */
echo "Test 2: creating a tree with php objects\n";
$dom = xmltree($xmlstr);
+$dom->root->name = "section";
var_dump($dom);
echo $dom->root->name;
echo "\n";