3 ms·
Little trick with xml.Decoder. unlike unmarshal, decoder ignores any garbage after the XML, which is nice if you want to parse HTML without dealing with the DOM
by 38 2y ago
Little trick with xml.Decoder. unlike unmarshal, decoder ignores any garbage after the XML, which is nice if you want to parse HTML without dealing with the DOM