1SAX.setDocumentLocator() 2SAX.startDocument() 3SAX.startElement(html) 4SAX.characters( 5 , 3) 6SAX.startElement(body) 7SAX.characters( 8 , 5) 9SAX.startElement(div) 10SAX.characters( 11 , 7) 12SAX.startElement(h3) 13SAX.characters( 14 , 9) 15SAX.startElement(a, href='https://html.spec.whatwg.org/multipage/parsing.html#parse-error-incorrectly-closed-comment') 16SAX.characters( 17 Incorrectly closed , 46) 18SAX.endElement(a) 19SAX.characters( 20 , 7) 21SAX.endElement(h3) 22SAX.characters( 23 , 7) 24SAX.startElement(div) 25SAX.characters( 26 , 9) 27SAX.error: Comment incorrectly closed by '--!>'SAX.comment(incorrectly closed comment) 28SAX.startElement(span, id='under-test') 29SAX.characters(whatwg guidance is that this s, 49) 30SAX.endElement(span) 31SAX.comment(correctly closed comment) 32SAX.characters( 33 , 7) 34SAX.endElement(div) 35SAX.characters( 36 , 5) 37SAX.endElement(div) 38SAX.characters( 39 , 3) 40SAX.endElement(body) 41SAX.characters( 42, 1) 43SAX.endElement(html) 44SAX.characters( 45, 1) 46SAX.endDocument() 47