I am currently implementing DFS traversal of an xml such that it goes to each leaf node and generates the path to the leaf node.
Given XML:
<vehicles>
<vehicle>
gg
</vehicle>
<variable>
</variable>
</vehicles>
Output (Somthing like):
Map("gg" -> "vehicles/vehicle", "" -> "vehicles/variable")
It would be great if there is a library available that does this so I dont have to maintain the code.
Thanks. Any help is appreciated.
Here is a solution using standard scala xml library, prints out a map of paths -> "node text"