public static void main(String[] args) {
String filePath = "sources/small-world-1.gexf";
Graph g = new DefaultGraph("g");
FileSource fs = null;
try {
fs = FileSourceFactory.sourceFor(filePath);
fs.addSink(g);
fs.begin(filePath);
while (fs.nextEvents()) {
// Optionally some code here ...
}
fs.end();
} catch( IOException e) {
e.printStackTrace();
}
}