igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] Namespaces and GraphML


From: Robin Müller-Bady
Subject: [igraph] Namespaces and GraphML
Date: Tue, 23 Sep 2014 15:11:34 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0

Hi there,

I am using igraph in order to read, process and write graphml files of graphml version 1.1 (http://graphml.graphdrawing.org/xmlns/1.1/graphml.xsd). I get the graphml files from a java generator and postpress them with the igraph python interface. The problem is, that the java graphml generator creates specific namespaces in the files, e.g. "xmlns:ns2="http://www.w3.org/1999/xlink"; " such that it results in a file that looks like follows:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<graphml xmlns:ns2="http://www.w3.org/1999/xlink";
    xmlns:ns3="http://graphml.graphdrawing.org/xmlns";>
    <ns3:graph id="Barabasi-Albert-73751112" edgedefault="undirected">
        <ns3:node id="0"/>
        <ns3:node id="1"/>
        <ns3:node id="2"/>
        <ns3:edge id="0" source="1" target="0"/>
        <ns3:edge id="1" source="2" target="1"/>
    </ns3:graph>
</graphml>

which is not readable by igraph anymore ("igraph._igraph.InternalError: Error at foreign-graphml.c:1139: Graph index was too large, Invalid value").

I am currently using Debian Jessie with igraph 0.7.0 and Python 2.7.8.

You have any ideas on how to fix that without processing the file through awk/sed?

Regards,

Robin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]