Programatically get nodes from a goview

How do I get all the nodes (GoBasicNode) nodes and Links GoLabeledLink from a goView programatically.<?:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

This is discussed in the User Guide in the section “Traversing a Diagram”, pages 29-33.