Integer eventType = reader.next();
if (eventType.equals(XMLEvent.START_ELEMENT)) {
String name = reader.getLocalName();
if (ELEMENT_NODEDATA.equalsIgnoreCase(name)) {
AbstractNode node = treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null, "nodepre")));
NodeDataImpl nodeDataImpl = (NodeDataImpl) node.getNodeData();
readNodeData(reader, nodeDataImpl, structure);
} else if (ELEMENT_EDGEDATA.equalsIgnoreCase(name)) {
AbstractNode source = treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null, "sourcepre")));
AbstractNode target = treeStructure.getNodeAt(Integer.parseInt(reader.getAttributeValue(null, "targetpre")));
AbstractEdge edge = source.getEdgesOutTree().getItem(target.getId());