code: def parse_state_variable(self, node):
          
  
          if 'name' in node.lattrib:
              name = node.lattrib['name']
          else:
              self.raise_error('<StateVariable> must specify a name')
  
          if 'dimension' in node.lattrib:
              dimension = node.lattrib['dimension']
          else:
              self.raise_error("State variable '{0}' must specify a dimension", name)
  
          if 'exposure' in node.lattrib:
              exposure = node.lattrib['exposure']
          else:
              exposure = None
  
          self.current_regime.add_state_variable(StateVariable(name, dimension, exposure))
docs: Parses <StateVariable>
  
          @param node: Node containing the <StateVariable> element
          @type node: xml.etree.Element
  
          @raise ParseError: Raised when the state variable is not
          being defined in the context of a component type.