tokenize
fun tokenize(xml: String, keepComments: Boolean = false, keepNames: Boolean = false): List<KiteXmlToken>(source)
The flat token stream: start tags with attributes, end tags, and text. Tag soup is salvaged, never rejected. Use parse for a tree; callers that need HTML's implied end tags fold the tokens themselves. A comment is a KiteXmlToken.Comment for keepComments, and is skipped otherwise.
For keepNames, an attribute keeps its name as the markup writes it, with its prefix and its case, and of two with one name the first wins, as HTML's tokenizer has it, for a caller that names attributes as a DOM does. Tag names lose their prefix and case either way.