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
  • 相关阅读:
    python之虚拟环境
    Django之auth模块
    Django之cookie/session
    前端构建工具gulp(2)-- 安装gulp-sass报错问题
    前端构建工具gulp(1)
    ebay api接口开发基本步骤
    华硕win10文档类文件点击右键时会闪一下,没法用右键打开文件
    oracle 12c 加入系统服务
    maven热部署到tomcat
    eclipse配置tomcat
  • 原文地址:https://www.cnblogs.com/cy163/p/1638001.html
Copyright © 2011-2022 走看看