I want to get a list of all nodes and some attributes (e.g. label name) in a yEd created graphml file regardless of where they are located in the graph. This has been partially dealt with already (Processing XML file with networkx in python and How to iterate over GraphML file with lxml) but not when you 'group' nodes within yEd - and I have lots of groupings within groupings.
Have tried networkx and lxml but not getting complete set of results using simple approaches suggested - any suggestions on elegant way to resolve and which library to use short of recursively iterating through tree and identifying group nodes and drilling down again.
Example:
Sample output for very simple graph using networkx when you have groupings:
('n0', {})
('n1', {'y': '0.0', 'x': '26.007967509920633', 'label': 'A'})
('n0::n0', {})
('n0::n1', {})