def start_tag(doc, name, attr=None, body=None, namespace=None):
 if (attr is None):
  attr = {}
 attr_vals = {}
 attr_keys = {}
 for (key, val) in attr.items():
  key_tuple = (namespace, key)
  attr_vals[key_tuple] = val
  attr_keys[key_tuple] = key
 attr2 = AttributesNSImpl(attr_vals, attr_keys)
 doc.startElementNS((namespace, name), name, attr2)
 if body:
  doc.characters(body)

def start_tag ( doc , name , attr = None , body = None , namespace = None ) : if ( attr is None ) : attr = { } attr_vals = { } attr_keys = { } for ( key , val ) in attr . items ( ) : key_tuple = ( namespace , key ) attr_vals [ key_tuple ] = val attr_keys [ key_tuple ] = key attr2 = AttributesNSImpl ( attr_vals , attr_keys ) doc . startElementNS ( ( namespace , name ) , name , attr2 ) if body : doc . characters ( body )
the text representation of the start tag for a tag .