# How to read GraphML with node and vertex metadata

**URL:** <https://discourse.julialang.org/t/how-to-read-graphml-with-node-and-vertex-metadata/96770>\
**Category:** Graphs\
**Tags:** question, metadata, io, graphs\
**Created:** [March 29, 2023, 10:07am UTC](https://discourse.julialang.org/t/how-to-read-graphml-with-node-and-vertex-metadata/96770 "2023-03-29T10:07:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ArtHarg](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@ArtHarg](https://discourse.julialang.org/u/ArtHarg)\
**Post date:** [March 29, 2023, 10:07am UTC](https://discourse.julialang.org/t/how-to-read-graphml-with-node-and-vertex-metadata/96770/1 "2023-03-29T10:07:15Z")

</div>

Is there an efficient way to read a GraphML file and produce a MetaGraph?

My use case: I have a file containing 210,157 vertices and 1,016,092 edges, all with metadata. I can succesfully read the graph using

> g = loadgraph(“~/calcGraph-20230316.graphml”,“graph”,GraphMLFormat())

but that ignores the `key` and `data` nodes. MetaGraph.jl doesn’t seem to have a function to read GraphML files.

Is there a way to read the GraphML, apart from using EzXML to read the GraphML file and building the MetaGraph myself? If not, what would be the most efficient and/or most Julian way to approach this?

---

<div class="post-metadata">

**Author:** ![gdalle](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gdalle/32/27854_2.png) [@gdalle](https://discourse.julialang.org/u/gdalle)\
**Post date:** [March 29, 2023, 12:39pm UTC](https://discourse.julialang.org/t/how-to-read-graphml-with-node-and-vertex-metadata/96770/2 "2023-03-29T12:39:50Z")

</div>

If you open an issue on [MetaGraphsNext.jl](https://github.com/JuliaGraphs/MetaGraphsNext.jl) we might be able to help. MetaGraphs.jl is not very actively developed

---

<div class="post-metadata">

**Author:** ![ArtHarg](https://avatars.discourse-cdn.com/v4/letter/a/7cd45c/32.png) [@ArtHarg](https://discourse.julialang.org/u/ArtHarg)\
**Post date:** [March 29, 2023, 12:54pm UTC](https://discourse.julialang.org/t/how-to-read-graphml-with-node-and-vertex-metadata/96770/3 "2023-03-29T12:54:54Z")

</div>

Thanks, I’ve opened an issue ([1645748316](https://github.com/JuliaGraphs/MetaGraphsNext.jl/issues/54#issue-1645748316))
