<s> from StringIO import StringIO <EOL> from lxml import etree <EOL> def remove_namespaces ( tree ) : <EOL> io = StringIO ( ) <EOL> """<STR_LIT>""" <EOL> xslt = """<STR_LIT>""" <EOL> xslt_root = etree . XML ( xslt ) <EOL> transform = etree . XSLT ( xslt_root ) <EOL> parsed_tree = transform ( tree ) <EOL> parsed_tree . write ( io ) <EOL> return io . getvalue ( ) </s>
