There is nothing in the framework that will convert a hierarchical tree of nodes into a flat list: it could not be sure that it would be possible to distingiush dfferent elements:
Root
branch1
leaf1
leaf2
branch2
leaf1
leaf2
A default flat view would have only four elements, two called "leaf1" and two called "leaf2".
You will have to recursively parse the tree.