public void printOut(){
    File file=new File(name);
    PrintWriter myout;
    try{
      myout=new PrintWriter(new FileOutputStream(file));
      myout.println("<mapfile bitmap=\""+mygraph.getImageName()+"\" scale-feet-per-pixel=\""+mygraph.getScale()+"\">");
      for(int i=0;i<mygraph.getCurr();i++){
        myout.println("<location id=\""+mygraph.locations[i].getID()
                        +"\" name=\""+mygraph.locations[i].getName()
                        +"\" x=\""+(int)mygraph.locations[i].getPoint().getX()
                        +"\" y=\""+(int)mygraph.locations[i].getPoint().getY()+"\" />");
      }
      for(int i=0;i<mygraph.getCurr();i++){
        for(int j=i;j<mygraph.getCurr();j++){
          if(mygraph.adjacent[i][j]){
            myout.println("<path idfrom=\""+i+"\" idto=\""+j+"\" type=\"undirected\">"); 
          }
        }
      }
      myout.println("</mapfile>");
      if(myout!=null){
        myout.close();
      }
    }
    catch(FileNotFoundException e){
      System.out.println("File "+file.getName()+" not found!"); 
    }
  }