[SOLVED] Difficulty creating my own GEXF files

All questions about the GEXF (see http://gexf.net before)
Post Reply [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
craigjolley
Posts:4
Joined:15 Apr 2010 19:01
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[SOLVED] Difficulty creating my own GEXF files

Post by craigjolley » 21 Apr 2010 21:18

Hi... I'm quite new to both Gephi and XML, and I"m having some trouble. I can load the example datasets from the Gephi website just fine and have worked through the Gephi tutorial, but now I'm trying to generate graphs from some of my own data using the GEXF format. My file test.gexf looks like:

<?xml version="1.0" encoding="UTF-8"?>
<gexf xmlns="http://www.gexf.net/1.1draft"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.gexf.net/1.1draft
http://www.gexf.net/1.1draft/gexf.xsd"
version="1.1">
<graph mode="static" defaultedgetype="directed">
<nodes>
<node id="0" label="0" />
<node id="1" label="1" />
<node id="2" label="2" />
<node id="3" label="3" />
<node id="4" label="4" />
</nodes>
<edges>
<edge id="0" source="0" target="1" />
<edge id="1" source="0" target="4" />
<edge id="2" source="1" target="2" />
<edge id="3" source="1" target="3" />
<edge id="4" source="3" target="4" />
</edges>
</graph>
</gexf>

When I try to load this in Gephi, however, I don't see anything. I don't get the dialog box showing me how many nodes and edges have been loaded, I don't get an error message, it's as if I'd done nothing at all. As I said before, I can load other people's data sets without trouble, so it must be a problem with my GEXF file. Any ideas what might be going on?

Thanks,

--craig

craigjolley
Posts:4
Joined:15 Apr 2010 19:01
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable

Re: Difficulty creating my own GEXF files

Post by craigjolley » 21 Apr 2010 21:48

I figured it out (sort of). If Ireplace
with

<gexf xmlns="http://www.gephi.org/gexf">

then Gephi can load my file just fine. It's not entirely clear to me why this worked; that might require XML knowledge beyond what I have at present.

Post Reply
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable
[phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1275: count(): Parameter must be an array or an object that implements Countable