Removing whitespace from XML
by Taavi Rammar
Need to remove whitespace from XML? Use that:
doc.root.find('//text()[not(normalize-space())]').each {|blanky| blanky.remove!}
Language doesn't really matter (currently ruby) but the xpath experssion is worth knowing.
Copyright by
techTips