code: def toxml(self):
          
  
          return '<StateVariable name="{0}" dimension="{1}"'.format(self.name, self.dimension) +\
            (' exposure="{0}"'.format(self.exposure) if self.exposure else '') +\
            '/>'
docs: Exports this object into a LEMS XML object