dcsimg

Can I validate a DOM using a DTD and return the errors to a logfile?

Software Framework

You have to read the documentation of your DOM parser. Typically validation is done on XML strings before the DOM is generated. Check out the docs for xerces at www.apache.org.