You can use the same approach you described for OpenGL with Direct3D. Iterate the tree and for each node bind its vertex and index buffers and draw immediately.
Performance wise it may be better, as you suggested, to iterate the tree first without drawing anything and only writing the vertex and index data into two large buffers. Then for every frame set the buffers and iterate the tree, just as you would do in OpenGL. For every node bind the transformation and draw the associated primitive range from the already bound buffers.
If the geometry is static at the vertex level (no individual vertices have to be modified / added / deleted) you can reuse the buffers as often as you like.
Depending on your requirements and hardware you would have to do some profiling to find the best method.