summaryrefslogtreecommitdiff
path: root/ext/dom/examples/note.php
blob: a8695f366444256d27b68b8af1e7da8cced1a67a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php

$dom = new domDocument;
$dom->load('note.xml');
if (!$dom->validate('note.dtd')) {
  print "Document note.dtd is not valid\n";
} else {
  print "Document note.dtd is valid\n";
}

$dom = new domDocument;
$dom->load('note-invalid.xml');
if (!$dom->validate('note.dtd')) {
  print "Document note-invalid.xml is not valid\n";
} else {
  print "Document note-invalid.xml is valid\n";
}

?>