s#[ ]*$##g s# xmlns=""##g /NA<\/dimensions>/d s#\(units notes=.*\)>NA#\1/>#g