4 ms·
Indeed. There is an XML formatted file that is important to the engineers at my company. Sometimes they're namespaced; sometimes not, so just I remove the names
by TheRealDunkirk 3y ago
Indeed. There is an XML formatted file that is important to the engineers at my company. Sometimes they're namespaced; sometimes not, so just I remove the namespace if it's there. It wasn't like the people who defined the namespace gave us any usable format definition to work with anyway. The only thing worse than XML is an XML definition that's only half-implemented.
raw = Nokogiri::XML(File.read(uploaded_file).gsub(/ xmlns="[^"]\*"/, "")) { |config| config.noblanks }