Guest User

Untitled

a guest
Jul 20th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. require 'find'
  2. require 'nokogiri'
  3.  
  4. org_dir = ARGV[0]
  5. Find.find(org_dir).each do |f|
  6. if f.include?(".xml") || f.include?("_rels/.rels")
  7. p f
  8. xml_doc = File.open(f){|_f| Nokogiri::XML(_f)}
  9. File.open(f, "w"){|_f| _f.puts xml_doc}
  10. end
  11. end
Add Comment
Please, Sign In to add comment