GraphML: how to select data based on attribute values?

Created on 26 May 2023, over 1 year ago

Parse GraphML

I think I know the answer, but perhaps I'm missing something. I'm trying to import graphml using the XML Parser, which for a simple example works. But I noticed other possibilities present challenges.

<graphml xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">
  <key attr.name="label" attr.type="string" for="node" id="label"/>
  <key id="d0" for="node" attr.name="color" attr.type="string">
  <default>yellow</default>
  </key>
  <key id="d0" for="node" attr.name="color" attr.type="string">
  <default>yellow</default>
  </key>
  <key id="d1" for="edge" attr.name="weight" attr.type="double"/>
  <graph id="G" edgedefault="undirected">
    <node id="n0">
      <data key="d0">green</data>
      <data key="label">A</data>
    </node>
  </graph>
</graphml>

There are two data items, but they have consistent key attribute values. Is there a way to map d0 to one field and label to another?

πŸ’¬ Support request
Status

Fixed

Component

XML parser

Created by

πŸ‡ΊπŸ‡ΈUnited States couloir007

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024