Closed shinnya closed 7 years ago
The location of code reported by the above error is like:
GraphMLParser.prototype.buildEdges = function (data) {
var edges = data.graphml.graph[0].edge;
for (var _i = 0, edges_1 = edges; _i < edges_1.length; _i++) {
var edge = edges_1[_i];
I believe I almost understood the root cause, so I will fix this issue.
graphml-js can't parse a graph which has no edge and reports the following error:
The GraphML specification defines a graph as follows (excerpt from http://graphml.graphdrawing.org/xmlns/1.1/graphml-structure.xsd):
This XMLSchema defines the elements of
graph.type
asminOccurs=0
, so it means that a graph which has no data, node, edge, and hyperedge is allowed.