@classmethod
def parse(cls, data, strict=False):
    """

        Given a string data containing the wire representation of a
        DNS TXT record, parse it and return a TXTRecord instance.  The
        strict parameter is passed to the TXTRecord constructor.

        """
    txt = cls(strict=strict)
    while data:
        length = ord(data[0])
        item = data[1:length + 1].split('=', 1)
        if item[0] and item[0] not in txt:
            if len(item) == 1:
                txt[item[0]] = None
            else:
                txt[item[0]] = item[1]
        data = data[length + 1:]
    return txt
