We break down DOM parsing of XML in Kotlin on the JVM: how to turn XML into a
Document tree via
DocumentBuilderFactory and
parse(), how to work with
Element and
NodeList, read attributes via
getAttribute() and text via
textContent, and also how to write “non-crashing” code with
as?,
?:,
trim(), and
toDoubleOrNull().