Location: Metabolic Component Library @ 175a7120ac7b / CellML-source / CellMLTools / src / tools / CellMLWriter.java
- Author:
- Randall Britten <r.britten@auckland.ac.nz>
- Date:
- 2013-04-19 13:52:31+12:00
- Desc:
- Removed duplicate cmeta:id attribute that was causing an XML error, and changed metadata to use the more human readable ID.
- Permanent Source URI:
- https://staging.physiomeproject.org/w/matthiaskoenig/MetabolicComponentLibrary/rawfile/175a7120ac7b498b3d24bee77ba939f3974c8181/CellML-source/CellMLTools/src/tools/CellMLWriter.java
package tools;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import cellml_api.Model;
public class CellMLWriter {
public static void writeToFile(Model model, String outputFileName ){
try{
PrintWriter writer = new PrintWriter(new FileWriter(outputFileName));
writer.println(model.getSerialisedText());
writer.close();
}
catch(IOException e)
{
e.printStackTrace();
}
}
}
