igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] Namespaces and GraphML


From: Robin Müller-Bady
Subject: Re: [igraph] Namespaces and GraphML
Date: Wed, 24 Sep 2014 10:16:47 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0

Dear Tamás,

thanks a lot for your help, Im subscribed to that issue and will pull the patch asap :)

Regards,

Robin

On 09/24/2014 10:09 AM, Tamás Nepusz wrote:
Hi there,

It looks like we were being sloppy when we implemented the GraphML parser and 
simply assumed that GraphML tags are in the default namespace. We cannot offer 
you an easy fix right now -- I'm working on the issue, but this will probably 
get into igraph 0.7.2 only. You can follow our progress on the issue here:

https://github.com/igraph/igraph/issues/685

If you are willing to recompile igraph from scratch, you will probably be able 
to cherry-pick the patch (which I will post on the issue page above) and merge 
into your copy of igraph. Alternatively, you can probably use Python's 
ElementTree module to load the GraphML file, move every GraphML-related tag to 
the default namespace, write it out again, and then load it using igraph. This 
would probably be safer than manipulating the XML file via awk/sed. Also, 
command-line XML manipulation tools such as XMLStarlet might provide you with 
an easier way to move GraphML-related stuff to the default namespace, but I'm 
not familiar with those.

Thanks for the bug report!

Best,
--
T.

-----Original Message-----
From: Robin Müller-Bady <address@hidden>
Reply: Help for igraph users <address@hidden>>
Date: 23 September 2014 at 15:12:33
To: address@hidden <address@hidden>>
Subject:  [igraph] Namespaces and GraphML

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:
xmlns:ns3="http://graphml.graphdrawing.org/xmlns";>
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 _______________________________________________
igraph-help mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/igraph-help




reply via email to

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