XML¶
A utility function for parsing XML formats is provided, along with an export to a generic XML format (using Content MathML).
- myokit.formats.xml.split(tag)¶
Splits a
tag
(as used in elementtree) into a namespace and an element name part.
Exporting¶
- myokit.formats.xml.exporters()¶
Returns a dict of all exporters available in this module.
- class myokit.formats.xml.XMLExporter¶
This
Exporter
generates an XML file containing a model’s equations, encoded in Content MathML.- model(path, model, protocol=None)¶
Export the model to a generic xml document.
- post_export_info()¶
Optional method that returns a string containing information about this exporter, to be shown after the export is completed.
- runnable(path, model, protocol=None, *args)¶
Exports a
myokit.Model
and optionally amyokit.Protocol
to something that can be run or compiled.The output will be stored in the directory
path
. Amyokit.ExportError
will be raised if any errors occur.
- supports_model()¶
Returns
True
.
- supports_runnable()¶
Returns
True
if this exporter supports export of a model and optional protocol to a runnable piece of code.