Leo is, among other things, an opensource outlining editor.
This code snippet shows how to display the tree portion of a simple Leo file.
View on bl.ocks.org
Leo files are XML, the snippet transforms the Leo XML into JSON via XSL and then uses Vue.js to create the tree.