This simple script invokes the program tidy (available for Unix-like systems such as Linux and MacOS X) to reformat an XML SBML file. It writes the pretty-printed result to a destination file. This wrapper simplifies the task of invoking
tidy on SBML files by supplying some preselected arguments, so that users don't need to worry about it—users can just invoke
sbmltidy on an SBML file and be done with it.
- Install a recent (at least March 2009) version of the tidy program and make sure it is accessible on your shell's command search $path.
sbmltidy.shto a location on your computer's hard disk.
- Make sure
sbmltidy.shis accessible on your shell's command search $path, or else invoke
sbmltidy.shusing the full path to its location.
sbmltidy.sh input.xml output.xml
input.xml file is the file that you want to reformat; the
output.xml is the desired destination where the formatted output should be written. Both the input file and the destination output files must be specified on the command line. If the destination file exists, it will be overwritten.
The XML formatting produced by this utility does not match what libSBML produces, although there are substantial similarities. Probably the most noticeable difference is that
sbmltidy puts each attribute-value pair of an element on a separate line. Depending on your tastes, you may prefer one or the other style of XML formatting.
Licensing terms and distribution
This program is in the public domain.