From af1c908ff9e9cf015446fa17d676516468846c30 Mon Sep 17 00:00:00 2001 From: mircohaug <12728527+mircohaug@users.noreply.github.com> Date: Sat, 13 Apr 2019 15:37:17 +0200 Subject: [PATCH] fixes #33 --- pygraphml/graphml_parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pygraphml/graphml_parser.py b/pygraphml/graphml_parser.py index bca02be..0ff2b47 100644 --- a/pygraphml/graphml_parser.py +++ b/pygraphml/graphml_parser.py @@ -157,6 +157,9 @@ def parse(self, fname): # source/target attributes refer to IDs: http://graphml.graphdrawing.org/xmlns/1.1/graphml-structure.xsd e = g.add_edge_by_id(source, dest) + + # keep the id of the parsed dom + e.id = edge.getAttribute('id') for attr in edge.getElementsByTagName("data"): if attr.firstChild: