rustworkx.read_graphml#

read_graphml(path, /)#

Read a list of graphs from a file in GraphML format.

GraphML is a comprehensive and easy-to-use file format for graphs. It consists of a language core to describe the structural properties of a graph and a flexible extension mechanism to add application-specific data.

For more information see: http://graphml.graphdrawing.org/

Note

This implementation does not support mixed graphs (directed and unidirected edges together), hyperedges, nested graphs, or ports.

Note

GraphML attributes with graph domain are stored in attrs field.

Parameters:

path (str) – The path of the input file to read.

Returns:

A list of graphs parsed from GraphML file.

Return type:

list[Union[PyGraph, PyDiGraph]]

Raises:

RuntimeError – when an error is encountered while parsing the GraphML file.