xref: /PHP-5.6/ext/dom/examples/note.php (revision d0cf1ec4)
1<?php
2
3$dom = new domDocument;
4$dom->load('note.xml');
5if (!$dom->validate('note.dtd')) {
6  print "Document note.dtd is not valid\n";
7} else {
8  print "Document note.dtd is valid\n";
9}
10
11$dom = new domDocument;
12$dom->load('note-invalid.xml');
13if (!$dom->validate('note.dtd')) {
14  print "Document note-invalid.xml is not valid\n";
15} else {
16  print "Document note-invalid.xml is valid\n";
17}
18
19?>
20