jexp / neo4j-shell-tools

A bunch of import/export tools for the neo4j-shell
288 stars 55 forks source link

Import Graphml file fails if <key> has <default/> #125

Open komeda-shinji opened 6 years ago

komeda-shinji commented 6 years ago

import-graphml cause error:

com.sun.xml.internal.stream.events.EndElementEvent cannot be cast to javax.xml.stream.events.Characters

XmlGraphMLReader.java does not check isCharacters() for processing <default> of <key> tag.

I rewrite <key> tag in input graphml file:

e.g.

  <key attr.name="foo" attr.type="string" for="node" id="d4">
    <default/>
  </key>

as

  <key attr.name="foo" attr.type="string" for="node" id="d4"/>

It works fine.