It's the right approach, but instead of assuming that each Node in the graph is a Shape3D, you should get it out of the Enumeration as a Node, and then check to see if it an instanceof Shape3D before forcing the cast.
At least that way you won't get a ClassCastException at runtime!!
You will want to also check for Group nodes, because then you will want to iterate through all of the children of the sub-group. I believe most of the VRML Loaders support nested Groups.
Here's an example SceneGraph to illustrate:
+-- etc, etc, etc...
I am doing exactly the same thing in a ModelManager class, which supports loading several different types of Loaders (OBJ, VRML, and 3DS for now).