def writePlistToString(rootObject):
    plistData, error = (
        NSPropertyListSerialization.
        dataFromPropertyList_format_errorDescription_(
            rootObject, NSPropertyListXMLFormat_v1_0, None))
    if plistData is None:
        if error:
            error = error.encode('ascii', 'ignore')
        else:
            error = "Unknown error"
        raise NSPropertyListSerializationException(error)
    else:
        return str(plistData)
Return 'rootObject' as a plist-formatted string.
dataset/ETHPy150Open munki/munki/code/client/munkilib/FoundationPlist.py/writePlistToString