- or download this
<?xml version="1.0"?>
<!DOCTYPE roots SYSTEM 'dtd.dtd'>
...
<child2></child2>
<child3/>
</roots>
- or download this
<!ELEMENT roots (child1,child2,child3)>
<!ELEMENT child1 (#PCDATA)>
...
<!ELEMENT child2 EMPTY>
<!ELEMENT child3 (#PCDATA)>
- or download this
#!/usr/bin/perl
use strict;
...
else { print "dtd valid\n";}