Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add attributes to "data" by name not by id #21

Open
Lazloo opened this issue Dec 27, 2019 · 1 comment
Open

Add attributes to "data" by name not by id #21

Lazloo opened this issue Dec 27, 2019 · 1 comment

Comments

@Lazloo
Copy link

Lazloo commented Dec 27, 2019

Hello everyone,

I have an autogenerate graphml file like:

<?xml versi

    on='1.0' encoding='utf-8'?>
    <graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd"><key attr.name="relationship" attr.type="string" for="edge" id="d8"/>

    <key attr.name="node_name" attr.type="string" for="node" id="d0"/>
    <key attr.name="parent" attr.type="long" for="node" id="d1"/>
    <graph edgedefault="directed">
    <node id="123">
      <data key="d0">First</data>
    </node>
    <node id="124">
      <data key="d0">Second</data>
      <data key="d1">First</data>
    </node>
    ...

Currenty the node attributes in the final data are represented by the keys (d0 and d1). However, when I add a new attribute, the order changes and therefore the attribute name vs. id association.
Is it possible to add the attributes by name (node_name and parent)?

THX Lazloo

@hasanbalci
Copy link
Contributor

Currently, extension doesn't support reading data by name. It just evaluates key and value to construct the node data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants