NetworkX

Previous topic

networkx.read_graphml

Next topic

LEDA

networkx.parse_graphml

parse_graphml(lines)

Read graph in GraphML format from string.

Returns a MultiGraph or MultiDiGraph.

Nested graphs and multiple graphs are ignored.

Node, edge and graph data are stored as attributes. The key element can specify the type for each attribute (string, double, etc) and defaults. Data using a key value that matches a key element is given the attribute name attr.name. Data whose key value doesn’t match a key element uses key value itself as the attribute name.