def Canonicalize(node, output=None, **kw):
 if output:
  apply(_implementation, (node, output.write), kw)
 else:
  s = StringIO.StringIO()
  apply(_implementation, (node, s.write), kw)
  return s.getvalue()

def Canonicalize ( node , output = None , ** kw ) : if output : apply ( _implementation , ( node , output . write ) , kw ) else : s = StringIO . StringIO ( ) apply ( _implementation , ( node , s . write ) , kw ) return s . getvalue ( )
canonicalize -> utf-8 canonicalize a dom document/element node and all descendents .