Importing GraphML file from yED, part II

May 13, 2010 at 6:15 PM

[Transferred from a previous, resolved discussion.  -- Tony]

Hi Tony The above problem has reoccured in a slightly different form. I am now using NodeXL vs and yED vs 3.5 When I try to import a new yED .graphml file into NodeXL the following error message appears: The file could not be opened. Details: An XML node with the name "default" is missing a required descendant node whose value must be a non-empty String. The XPath is "text(0)". (There are no nested graphs in this file) I could post the text of the graphml file here if it would help regards, rick davies

May 13, 2010 at 6:23 PM


yED is doing something strange: It's saying that a vertex or edge attribute (such as color) has a default value (such as black), but then it's not specifying what that value is.  Technically, this doesn't seem to be prohibited by the GraphML spec, so I've modified NodeXL to allow this.  The fix will be in version of NodeXL.

In the meantime, there are two possible short-term workarounds for the problem:

1. If there is some way to assign a default attribute value in yED before exporting to GraphML, do so.

2. Otherwise, if you open the GraphML file in Notepad and remove all instances of "<default></default>" and "<default />" (those two chunks of text are equivalent, and I don't know which one yED uses), the edited file should open properly in NodeXL.

-- Tony

May 13, 2010 at 9:43 PM
Hi Tony Thanks for your quick response Removing the </default> from the file seems to work, though I am puzzled why there was no preceding <default> I will explore if it is possible to "assign a default attribute value in yED before exporting to GraphML" thanks, rick davies
Oct 27, 2011 at 3:43 AM

I'm having the reverse problem.  From NodeXL, I exported my chart as GraphML file.  When I opened it yEd, all I had was a single node with none of the text of the vertices from my original chart.

Oct 27, 2011 at 8:06 AM
I think I have had the same problem. Hiding behind that single node is the whole network, so to speak.

Try clicking Layout>Organic and so on, to kick it open
I think that worked for me. But let me know if this does not work

I am interested to hear from others that try to use yEd and NodeXL as a package. I like the data management capacities of NodeXL but prefer the visualisation capacities of yED

regards, rick davies
Oct 27, 2011 at 1:26 PM
Edited Oct 27, 2011 at 1:35 PM

Thanks rickjdavies.  That did solve my 'single node' problem.  I now see the entire chart.

However, I lost all the data that went with the graph (no labels, vertices data, etc).

Any thoughts on where it might be or how I can retain it?

Oct 27, 2011 at 1:41 PM


I think this data loss problem that I found as well, but was unable to solve. I would try sending the NodeXL GraphML file to the yEd support people and see if they can identify why the data was stripped out. They have been helpful to me in the past

It may be that you need to set up dedicated data fields in yEd before importing/opening the NodeXL GraphML file. There is more capacity to do this now than in the past. I cant recall the steps off hand, but will try to find them later today

Oct 27, 2011 at 3:35 PM

If someone contacts the yEd support people, I would be interested in hearing their response.  NodeXL exports the graph in a simple GraphML format without using any of GraphML's more-advanced features that might not be supported by other software, so I would expect yEd to be able to import it.  NodeXL does not use GraphML's nested graph capabilities, for example.

-- Tony

Oct 28, 2011 at 6:37 PM

Here's their response:

"This is not exactly a data loss but due to the GraphML specification. This standard describes only the structural information in diagrams, that is the definition of nodes, their connections, nested sub-parts (groups) and user-defined data, but not the visual representation of elements. Due to this, and a lack of coordination, visuals are stored very different in NodeXL and yEd.

The good thing is that NodeXL stores its visual properties in standard GraphML data fields (so -called GraphML attributes) which are read in by yEd. You can check this by selecting a node and have a look at its 'Data' properties, there should be fields like 'V-X', V-Y' and 'V-Size'. With the 'Properties Mapper' tool, you can map (some of) these data to their respective visual representation. Please have a look at the manual articles about Custom Properties and Properties Mapper for more information.
Note that in the NodeXL file I checked, color values are stored as decimal triples, for example '23, 182, 43', whereas yEd expects hexadecimal representations like '#2e55a1'. Therefore, mapping colors will not work."
Oct 28, 2011 at 6:46 PM

Sorry, I should note that following these instructions worked great.  None of my attributes were lost.  Thank goodness!