class Nokogiri::XML::Document

def validate

the document or +nil+ when there is no DTD.
Validate this Document against it's DTD. Returns a list of errors on
#
def validate
  return nil unless internal_subset
  internal_subset.validate self
end