def CreateClassFromXMLString(target_class, xml_string, string_encoding=None):
  encoding = string_encoding or XML_STRING_ENCODING
  if encoding and isinstance(xml_string, unicode):
    xml_string = xml_string.encode(encoding)
  tree = ElementTree.fromstring(xml_string)
  return _CreateClassFromElementTree(target_class, tree)
Creates an instance of the target class from the string contents.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/atom/__init__.py/CreateClassFromXMLString