code: def readPlistFromString(data):
      '''Read a plist data from a string. Return the root object.'''
      try:
          plistData = buffer(data)
      except TypeError, err:
          raise NSPropertyListSerializationException(err)
      dataObject, dummy_plistFormat, error = (
          NSPropertyListSerialization.
          propertyListFromData_mutabilityOption_format_errorDescription_(
              plistData, NSPropertyListMutableContainers, None, None))
      if dataObject is None:
          if error:
              error = error.encode('ascii', 'ignore')
          else:
              error = "Unknown error"
          raise NSPropertyListSerializationException(error)
      else:
          return dataObjecf readPlistFromString(data):
      '''Read a plist data from a string. Return the root object.'''
      try:
          plistData = buffer(data)
      except TypeError, err:
          raise NSPropertyListSerializationException(err)
      dataObject, dummy_plistFormat, error = (
          NSPropertyListSerialization.
          propertyListFromData_mutabilityOption_format_errorDescription_(
              plistData, NSPropertyListMutableContainers, None, None))
      if dataObject is None:
          if error:
              error = error.encode('ascii', 'ignore')
          else:
              error = "Unknown error"
          raise NSPropertyListSerializationException(error)
      else:
          return dataObject
docs: Read a plist data from a string. Return the root object.