With the Tree style, each element node is an array. The first member is the name of that element, the second is a reference to an array (the content of that element). The first item of that array is a hash reference which contains any attributes (or nothing, if there are none). The data structure looks something like this:
[ "outside",
[ "inside",
[ { "name" => "Wibble"},
0, "some data"]
]
]
Yuck.