Forums

Full Version: reading graph from a graphml file
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Good morning flare users,

hope life is pleasing yet challenging ;-)

This demo reads the graph from a graphml file. It implements for that purpose a simple GraphMLReader class which seems to do the job and might be of use for some beings around.

One strange problem I discovered is that the GraphMLConverter seems to have troubles if the graphml tag is written like

Code:
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">

so for the time being I replaced it with

Code:
<graphml>

in the attached socialnet.xml file, on which this demo is based and which you need to download and place in the “execution” directory of your IDE in order to get this extremely mind blowing demo running Wink

A GraphMLReader class would be of course a candidate for the flare lib, so please help with your feedback to make this first round attempt something mature.


Cheers


martin


requires flare version 2008.07.29 or higher
Hi Martin,

why is it not possible to load data from an external source f.e.

Code:
gmr.read("http://iaf-ma.de/_dennis24/Projektarbeit/casa_data.xml");

This won't work, nor uploaded on a server:
http://www.mightyx.de/GraphMLFileDemo/GraphMLFile.html

edit: just found the solution of this problem: A crossdomain.xml is needed on the target server (f.e. http://www.youtube.com/crossdomain.xml)

greets Dennis
Hi Denis,

thanks for sharing the solution.

cheers

martin
34all Wrote:
Code:
<graphml xmlns="http://graphml.graphdrawing.org/xmlns">

so for the time being I replaced it with

Code:
<graphml>

Hey Martin,

I thought I would point out that the reason you can't access the first example is because you need to set the namespace in AS3:
Code:
namespace ns= "http://graphml.graphdrawing.org/xmlns";
use namespace ns;

You can learn more about namespace here:
http://livedocs.adobe.com/flash/9.0/Acti...space.html

- Anthony
Hello Anthony,

thanks a lot for pointing that out.

Cheers

martin
Reference URL's