I am trying import a graphml file I created with NodeXL in mathematica in order to create a network.

However when i try to import it I get the error message: "Cannot import data as GraphML format".

Any help is greatly appreciated! Thank you!!

  • 3
    $\begingroup$ you will likely need to make an example file available $\endgroup$ – george2079 Nov 24 '15 at 13:45

I downloaded graph 57698 from the NodeXL Graph Gallery, changed the suffix from "xml" to "graphml", tried to Import, and got the same error you report.

Now I don't know anything about XML, but I noticed that GraphML files generated by NetworkX have a namespace that NodeXL didn't include: xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance. Adding it made the import work ... no clue why.

My modified GraphML file begins with:

<?xml version="1.0" encoding="UTF-8"?>
<graphml xmlns="http://graphml.graphdrawing.org/xmlns" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  • $\begingroup$ I tried doing what you suggested but I cannot seem to make it work. This is what I get: Information::notfound: Symbol xml not found. >> Information::nomatch: No symbol matching version="1.0" found. >> Information::nomatch: No symbol matching encoding="UTF-8"?> found. >> Import::fmterr: Cannot import data as GraphML format. >> Set::write: Tag Times in graphml.graphdrawing.org/xmlns (xmlns:xsi) is Protected. >> Set::write: Tag Times in graphml xmlns is Protected. >> $\endgroup$ – pollon Nov 26 '15 at 11:07
  • 1
    $\begingroup$ Can't provide any further suggestions without a link to an example file that doesn't import. Please post an answer to your own question if resolved. $\endgroup$ – Ian Nov 30 '15 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.