class Nokogiri::XML::Document

def validate

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