def getAttribute(self):
data = self.data<EOL>c = data.skip(spaceCharactersBytes | frozenset([b"<STR_LIT:/>"]))<EOL>assert c is None or len(c) == <NUM_LIT:1><EOL>if c in (b"<STR_LIT:>>", None):<EOL><INDENT>return None<EOL><DEDENT>attrName = []<EOL>attrValue = []<EOL>while True:<EOL><INDENT>if c == b"<STR_LIT:=>" and attrName:<EOL><INDENT>break<EOL><DEDENT>elif c in spaceCharactersBytes:<EOL><INDENT>c = data.skip()<EOL>break<EOL><DEDENT>elif c in (b"<STR_LIT:/>", b"<STR_LIT:>>"):<EOL><INDENT>return b"<STR_LIT>".join(attrName), b"<STR_LIT>"<EOL><DEDENT>elif c in asciiUppercaseBytes:<EOL><INDENT>attrName.append(c.lower())<EOL><DEDENT>elif c is None:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>attrName.append(c)<EOL><DEDENT>c = next(data)<EOL><DEDENT>if c != b"<STR_LIT:=>":<EOL><INDENT>data.previous()<EOL>return b"<STR_LIT>".join(attrName), b"<STR_LIT>"<EOL><DEDENT>next(data)<EOL>c = data.skip()<EOL>if c in (b"<STR_LIT:'>", b'<STR_LIT:">'):<EOL><INDENT>quoteChar = c<EOL>while True:<EOL><INDENT>c = next(data)<EOL>if c == quoteChar:<EOL><INDENT>next(data)<EOL>return b"<STR_LIT>".join(attrName), b"<STR_LIT>".join(attrValue)<EOL><DEDENT>elif c in asciiUppercaseBytes:<EOL><INDENT>attrValue.append(c.lower())<EOL><DEDENT>else:<EOL><INDENT>attrValue.append(c)<EOL><DEDENT><DEDENT><DEDENT>elif c == b"<STR_LIT:>>":<EOL><INDENT>return b"<STR_LIT>".join(attrName), b"<STR_LIT>"<EOL><DEDENT>elif c in asciiUppercaseBytes:<EOL><INDENT>attrValue.append(c.lower())<EOL><DEDENT>elif c is None:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>attrValue.append(c)<EOL><DEDENT>while True:<EOL><INDENT>c = next(data)<EOL>if c in spacesAngleBrackets:<EOL><INDENT>return b"<STR_LIT>".join(attrName), b"<STR_LIT>".join(attrValue)<EOL><DEDENT>elif c in asciiUppercaseBytes:<EOL><INDENT>attrValue.append(c.lower())<EOL><DEDENT>elif c is None:<EOL><INDENT>return None<EOL><DEDENT>else:<EOL><INDENT>attrValue.append(c)<EOL><DEDENT><DEDENT>
Return a name,value pair for the next attribute in the stream,
        if one is found, or None