So say I have an xml file that looks like this:

```
<foo>
 <bar></bar>
 <bar></bar>
 <bar></bar>
 ...
 <bar></bar>
</foo>

```

My goal is to validate each bar tag against a DTD. For simplicity, lets say that for each bar node that passes validation against the DTD the program outputs "true" and each bar node that fails it outputs "fail"

Using a SAX parser how would i implement this?

Thanks!