Skip to content

Instantly share code, notes, and snippets.

@akeem
Created July 26, 2010 21:44
Show Gist options
  • Save akeem/491299 to your computer and use it in GitHub Desktop.
Save akeem/491299 to your computer and use it in GitHub Desktop.
dtd information using Nokogiri
#hopefully this will help anyone else that ends up looking for this. I ended up looking this up a couple of times and figured it was worth writing down.
xml_document = Nokogiri::XML(File.read(File.join(File.dirname(__FILE__),'somexmlfile.xml')))
xml_document.internal_subset.system_id
xml_document.internal_subset.external_id
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment