add method toArray()

Is there a reason for excluding the root node as a member of the array?