def parseString(string, namespaces=True):
 if namespaces:
  builder = ExpatBuilderNS()
 else:
  builder = ExpatBuilder()
 return builder.parseString(string)

def parseString ( string , namespaces = True ) : if namespaces : builder = ExpatBuilderNS ( ) else : builder = ExpatBuilder ( ) return builder . parseString ( string )
parse a document from a string .