Fork me on GitHub
Vincent Cantin05:03:44

It highly depends on what you want to do with the data, and if your data is contextual or not (i.e. if a label has a special meaning when under some special parents)

Vincent Cantin05:03:43

A recursive DIY parsing function may be the simplest to implement and maintain.