JAXB unmarshalling ? Sax reader ? What about… nothing.

Here is a very tiny and naive xml parser made in kotlin. One function, one input (string), one output (map). Simple, and lightweight (no library). /]+)[^>]*>") val OPENING_CLOSING_TAG = Regex("^< ([^ >/]+)[^>]*/>") val CLOSING_TAG = Regex("^]+)>") val ATTRS = Regex("([a-zA-Z][a-zA-Z-0-9]*)=\"([^\"]*)\"") val root = mutableMapOf() val deque = ArrayDeque(listOf(root)) val attrSetFunc = {text: String, node: MutableMap… Read More »