Scala convert XML to key value map
问题 Related to This topic Problem is as follows, imagine an XML without any particular schema <persons> <total>2</total> <someguy> <firstname>john</firstname> <name>Snow</name> </someguy> <otherperson> <sex>female</sex> </otherperson> </persons> For processing I want to have this in a Key Value Map: "Persons/total" -> 2 "Persons/someguy/firstname" -> john "Persons/someguy/name" -> Snow "Persons/otherperson/sex" -> female Preferably I have some nice recursive function where I traverse the XML code