//################################################################################################
// Generate the XML file from the graph
public boolean writeFile(Graph graph, String fileName)
{
GraphMLWriter graphWriter = new GraphMLWriter();
try
{
//=== See if the file exists, if so overwrite it, if not create a new file and write to it
File newFile = new File(fileName);
if (newFile.exists())
{
graphWriter.writeGraph(graph, newFile);
}
else
{
newFile.createNewFile();
graphWriter.writeGraph(graph, newFile);
}
return true;
}
catch(Exception e){
System.out.println("Exception "+ e);