while(currentElement != null)
{
final String elemName = currentElement.getNodeName();
if (result != null) // we already know the final graph but there are more elements to come
throw new IllegalArgumentException("unexpected element "+elemName+" after the learner result is known");
StatechumXML kind = stringToEnumMap.get(elemName);
if (elemName.equals(StatechumXML.graphmlNodeNameNS.toString()) ||
elemName.equals(StatechumXML.gdGD.toString()))
{
String graphKind = currentElement.getAttribute(StatechumXML.ATTR_GRAPHKIND.name());