Skip to content

Instantly share code, notes, and snippets.

@Pistos
Created March 13, 2009 15:40
Show Gist options
  • Save Pistos/78618 to your computer and use it in GitHub Desktop.
Save Pistos/78618 to your computer and use it in GitHub Desktop.
require 'nokogiri'
doc = Nokogiri::XML( "<xml></xml>" )
doc.xpath( "//*" ).each do |element|
p = element.parent
if p
# p not nil
p.namespace # causes segfault
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment