Load graphml with LightGraphs

I want to load a graphml graph as LightGraphs SimpleGraphs. This is the code I am using:
`
using LightGraphs
using GraphIO

g = loadgraph(“graph.graphml”, GraphMLFormat())

But I got this error:
·
ERROR: UndefVarError: GraphMLFormat not defined
·
How can I fix this?

Some of the comments in this thread

might be applicable to you. For example, use Graphs,jl, not LightGraphs.jl, etc…

1 Like

I read this. It works when I use Graphs.jl rather than LightGraphs.jl. I am just wondering if I can directly load graph with LgihtGraphs.

LightGraphs was the name of a graphs package that was developed between 2015 and 2021. The principal author moved on to other things. But the package was renamed as Graphs.jl, and all development (including bug fixes and improvements! :)) since then has been based on Graphs.jl. Unfortunately “LightGraphs” still turns up in searches … :man_shrugging:t2:

1 Like

Thanks a lot for your answer. I was asking for LightGraphs because it is used by a paper I need to use. I will just use Graphs.jl then…