Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created December 4, 2009 18:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/249234 to your computer and use it in GitHub Desktop.
Save tmcw/249234 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'rubygems'
require 'nokogiri'
file = ARGV[0]
nok = Nokogiri::XML(open(file))
nok.css('Placemark').each do |p|
if p.css('Point coordinates').inner_text == '0.0,0.0'
p.remove
end
end
puts nok.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment