--TEST-- Test 7: DTD tests --SKIPIF-- --FILE-- ]> Basic Languages Introduction to Languages French I Introduction to French EOXML; $dom = new DOMDocument(); $dom->loadXML($xml); $dtd = $dom->doctype; /* Notation Tests */ $nots = $dtd->notations; $length = $nots->length; echo "Length: ".$length."\n"; foreach ($nots AS $key=>$node) { echo "Key $key: ".$node->nodeName." (".$node->systemId.") (".$node->publicId.")\n"; } print "\n"; for($x=0; $x < $length; $x++) { echo "Index $x: ".$nots->item($x)->nodeName." (".$nots->item($x)->systemId.") (".$nots->item($x)->publicId.")\n"; } echo "\n"; $node = $nots->getNamedItem('xxx'); var_dump($node); echo "\n"; /* Entity Decl Tests */ $ents = $dtd->entities; $length = $ents->length; echo "Length: ".$length."\n"; foreach ($ents AS $key=>$node) { echo "Key: $key Name: ".$node->nodeName."\n"; } echo "\n"; for($x=0; $x < $length; $x++) { echo "Index $x: ".$ents->item($x)->nodeName."\n"; } echo "\n"; $node = $ents->item(3); var_dump($node); $node = $ents->getNamedItem('xxx'); var_dump($node); --EXPECT-- Length: 1 Key GIF: GIF (image/gif) (-) Index 0: GIF (image/gif) (-) NULL Length: 3 Key: test Name: test Key: rdf Name: rdf Key: myimage Name: myimage Index 0: test Index 1: rdf Index 2: myimage NULL NULL