zoukankan      html  css  js  c++  java
  • 从此例中终于实现了从外部xml文件读取数据使用Flare 生成有节点有连线的Graph

    http://goosebumps4all.net/34all/bb/showthread.php?tid=127

    reading graph from a graphml file
    reading graph from a graphml file
    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


    Attached File(s)
    .xml  socialnet.xml (Size: 3.84 KB / Downloads: 816)
    .as  GraphMLFileDemo.as (Size: 6.49 KB / Downloads: 607)
    Find all posts by this user
    Quote this message in a reply
    17-04-2008, 11:03 AM (This post was last modified: 19-04-2008 10:10 AM by mightyx.)
    Post: #2
    RE: reading graph from a graphml file
    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
    Find all posts by this user
    Quote this message in a reply
    21-04-2008, 08:18 AM  
    Post: #3
    RE: reading graph from a graphml file
    Hi Denis,

    thanks for sharing the solution.

    cheers

    martin
    Find all posts by this user
    Quote this message in a reply
    25-05-2008, 01:20 AM  
    Post: #4
    RE: reading graph from a graphml file
    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
    Find all posts by this user
    Quote this message in a reply
    25-05-2008, 09:18 AM  
    Post: #5
    RE: reading graph from a graphml file
    Hello Anthony,

    thanks a lot for pointing that out.

    Cheers

    martin
    Find all posts by this user
    Quote this message in a reply
    27-02-2009, 11:25 PM  
    Post: #6
    RE: reading graph from a graphml file
    How do you implement the ns namespace in a flex/ flash project?


    (25-05-2008 01:20 AM)agraddy Wrote:  
    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
    Find all posts by this user
    Quote this message in a reply
    28-04-2009, 05:41 PM  
    Post: #7
    RE: reading graph from a graphml file
    Hi:

    First I want to thank this forum because it is helping me a lot. I have a question:

    I use this class for learn the flare layouts and create a radial tree, but my file I think that is big because with a simple graph file i can see the radial tree but with the attach file (graphfile.xml) I have this error:

    #1502: El tiempo de ejecución del script ha superado el tiempo de espera predeterminado de 15 segundos.

    The time execution is more than 15 seconds and i can't load de graph file. I use flex builder 3 with flare because i want to create a interface to see the visualization of the users with some charts. But if i can't load the file i can't start the project.......

    thank's a lot.

    (10-04-2008 10:36 AM)34all Wrote:  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
    Find all posts by this user
    Quote this message in a reply
    24-06-2009, 07:03 AM (This post was last modified: 24-06-2009 07:06 AM by prits23.)
    Post: #8
    RE: reading graph from a graphml file
    (10-04-2008 10:36 AM)34all Wrote:  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,

    In GraphMLFileDemo.as I am unable to load another xml file .

    [gmr.read("http://10.74.65.142:8080/JSP2XMLNihar/test3.jsp")]

    Please help.

    thnks and regards
    prits








    (10-04-2008 10:36 AM)34all Wrote:  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
    Find all posts by this user
    Quote this message in a reply
    24-06-2009, 09:46 AM (This post was last modified: 24-06-2009 09:48 AM by 34all.)
    Post: #9
    RE: reading graph from a graphml file
    Hi Prits,

    do you have a proper crossdomain.xml on the target server? (see mightyx's reply above)

    martin
  • 相关阅读:
    php图片上传代码
    数据库笔记
    数学函数类方法的使用.java
    有n人围成一圈,顺序排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来的第几号的那位。
    现有有N个学生的数据记录,每个记录包括学号、姓名、三科成绩。 编写一个函数input,用来输入一个学生的数据记录。 编写一个函数print,打印一个学生的数据记录。 在主函数调用这两个函数,读取N条记录输入,再按要求输出。 N<100
    求Sn=1!+2!+3!+4!+5!+…+n!之值,其中n是一个数字
    分数相加减的代码(c++)
    Caesar cipher
    db2、Oracle存储过程引号用法
    CSS基础总结
  • 原文地址:https://www.cnblogs.com/cy163/p/1638001.html
Copyright © 2011-2022 走看看