Skip to content

Instantly share code, notes, and snippets.

@keithrbennett
Created March 31, 2011 02:44
Show Gist options
  • Select an option

  • Save keithrbennett/895737 to your computer and use it in GitHub Desktop.

Select an option

Save keithrbennett/895737 to your computer and use it in GitHub Desktop.
Transcript of IRB session illustrating DTD Validate Problem
ree-1.8.7-2011.01 :003 > doc = Nokogiri::XML::Document.parse(File.read('sample.xml'))
=> #<Nokogiri::XML::Document:0x80899448 name="document" children=[#<Nokogiri::XML::DTD:0x80898e44 name="Foo">, #<Nokogiri::XML::Element:0x80898d40 name="Foo">]>
ree-1.8.7-2011.01 :004 > puts doc.validate
No declaration for element Foo
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment